Live data from Hacker News

Samoa cancels Friday 30th and travels one day forward in time

nytimes.com

1–10 of 37 posts

Re: Samoa cancels Friday 30th and travels one day forward in time

#2
It's cases like this that show that you should use a proper timezone library in your code. Too often I see websites where the timezone field is given as "+/- X from GMT". Just store everything in UTC, and use tzdata fields (e.g. "Europe/London") to convert to something nice to show the user, and People Cleverer Than You™ will make sure everything works.

Re: Samoa cancels Friday 30th and travels one day forward in time

#3
post #2

It's cases like this that show that you should use a proper timezone library in your code. Too often I see websites where the timezone field is given as "+/- X from GMT". Just store everything in UTC, and use tzdata fields (e.g. "Europe/London") to convert to something nice to show the user, and People Cleverer Than You™ will make sure everything works.

Would timezone libraries handle this specific case? Genuinely curious, not being sarcastic.

Re: Samoa cancels Friday 30th and travels one day forward in time

#5
post #3
post #2

It's cases like this that show that you should use a proper timezone library in your code. Too often I see websites where the timezone field is given as "+/- X from GMT". Just store everything in UTC, and use tzdata fields (e.g. "Europe/London") to convert to something nice to show the user, and People Cleverer Than You™ will make sure everything works.

Would timezone libraries handle this specific case? Genuinely curious, not being sarcastic.

Yes they will, but this time they seems to have missed it so the updated database will be released after the change. See the thread about this in the Olson database mailing list.

http://mm.icann.org/pipermail/tz/2011-December/008457.html

EDIT: Correction, that thread was about Tokelau and not Samoa. The Samoan change seems to already be in the latest version of the database.

Re: Samoa cancels Friday 30th and travels one day forward in time

#7
It's actually quite lucky that the world has a sensible longitude upon which an International Date Line can be dropped. Imagine if there was an unbroken ring of industrialised nations going all the way around the Earth, I can see a situation where each nation wants to do business with the nation to its immediate west so badly that they just adjust their clocks forward and forward over the course of decades. Eventually, every nation on Earth has done it, and an entire day has essentially disappeared from the calendar - except that the UK is at UTC+24:00 now.
Post reply on HN