Reply to post: Re: Aukward moment

Developers' timezone fail woke half of New Zealand

Adam 1 Silver badge

Re: Aukward moment

Sorry, but anyone who thinks timezones are simple doesn't know what they are talking about. Did you know that not all timezones are on the hour. Oh hi Adelaide. In fact not all are even on the half hour (hi Kathmandu). Not all timezones are between -12 and +12 (hi Kiribati with your cheeky +14). Then you have daylight savings transitions on top. Congratulations to our Brazilian contingent for not having midnight on Sunday week. Yes folks, it goes straight from 23:59.9999 to 01:00 and causing problems for any software that gets the current date by truncating the current local time.

Why attribute malice where incompetence is far more likely. In many languages, the datetime class has a property to indicate whether it is UTC or local. Most of the time (ha!) it won't make a difference but if you send that via any form of serialisation framework it will get auto converted to UTC and back at the other end. If it thinks the time is already UTC, but the recipient is expecting to convert back to local then in the case of NZ you are going to add 12 hours (or subtract if the same problem in reverse). Either way, lunchtime becomes middle of the night.

Now that's off my chest, I'm going to go and open a new medical practice, providing psychological services to those poor souls who have the misfortune of working with timezones.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019