3 ms·
> I have written code that only works in winter because of daylight saving times and some unfortunate date conversions Not sure where you are located, but this
by nicoburns 5y ago
> I have written code that only works in winter because of daylight saving times and some unfortunate date conversions
Not sure where you are located, but this can be particularly bad in the UK where winter time happens to coincide with UTC.
- DocTomoe 5y agoLet's be pedantic about this, because this is one of the very few areas where pedantry matters: GMT ("British Winter Time") is NOT UTC, and it can differ from UTC up to 0.9 seconds. GMT is a time zone (corresponding to UT1). UTC is a time standard.
- jfk13 5y agoTo be pedantic, this is an area where pedantry occasionally matters. For the vast majority of (casual) usage, it doesn't.
- gerikson 5y agoIndeed. I get invites from people from the UK who simply refer to the current local time (GMT or BST) as "GMT". It just means current London time to them.
- ycombobreaker 5y agoSame happens in the US, people use EST/EDT interchangeably (and incorrectly) when they mean Eastern timezone. Or Central/Mountain/Pacific.
- nicoburns 5y agoOk, fair enough. But it's close enough that it's very easy for anything that isn't working with second-level granularity to seem like they're working only to break as soon as the time switches BST.
- dane-pgp 5y agoI appreciate your pedantry, and I wonder if you know of a widely used computer system which genuinely implements the GMT time zone as something different from UTC+0. There may be some niche astronomical or legal(?) applications which have to keep track of the potential 0.9 seconds skew, but my impression is that any app which claims to support a "GMT" (or Europe/London) option is actually only supporting "GMT-ish".
- Dylan16807 5y ago> GMT is a time zone (corresponding to UT1) Are you sure? Looking into things I would have said that GMT exists as a time reference but all the time zones are based on UTC.
- hughrr 5y agoYeah it’s horrible. I had a contract a number of years ago to fix a bug that they had been fighting for 5 years. When winter time kicked in all appointments on their booking system collapsed to zero minutes long. To fix this they ran a SQL script that changed the end date on the DST switch over but that had some poor assumptions in it and made it worse. It also had to be correct in the past and the future. I just rewrote the whole fucking thing from scratch.