Hacker News new | ask | show | jobs
by eirikbakke 308 days ago
A subscription will renew at 2025-08-16 04:04Z, and the billing system must send an email to the user reminding them of this. What date do you show in the email?

A meeting happens every Tuesday at 9am, starting February 18, 2025. What time does the calendar show once DST kicks in?

1 comments

Systems can always translate UTC to a user’s own time-zone for display purposes, including accommodating DST; but internally all values are stored as UTC and all calculations are performed on UTC values.
That doesn’t answer the question of „What time does the calendar show once DST kicks in?“.
That’s up to the user’s preferences: their phone/computer’s timezone.
The meeting is at a different time in UTC when DST kicks in.
Yes, but that’s handled by the user’s software when they access or edit the appointment. All calendaring software I know uses UTC internally like that, where the tz adjustments (including daylight savings rules - and historical too! are the responsibility of the topmost, user-facing parts of the system. I don’t know why I’m getting downvoted for saying this - am I missing something?
If you set a recurring meeting, every Friday at 10:00AM, New York time, the time in UTC varies (either 14:00 UTC or 15:00 UTC) depending on the date. Further, what is displayed depends on the viewer's location (because daylight savings times change differently based on location/date). IOW, the time of the meeting occurs on TWO UTC times, not one. You can't just store UTC and be done with it. You need the originating timezone too. In other cases you may need the date the item was created as well.

More sophisticated calendar software will take into account holidays or use offsets from month start/end. i.e. "we'll have a meeting at 9:00pm Tokyo time, every last business day of each month".