2025-01-17 21:58 UTC
Replies (4)
-
@bert_hubert@fosstodon.org 2025-01-18 16:01
I have finally found an up to date standard that covers mktime(), https://pubs.opengroup.org/onlinepubs/9799919799/functions/mktime.html - and in it we learn that on error mktime returns the valid timestamp -1 (which happened in 1969 UTC). To detect if this was an actual error, callers must set tm.tm_wday to -1, and check if after a call it is still -1. In that case, an error happened.
-
@ColmDonoghue@mastodon.ie 2025-01-17 22:08
@bert_hubert@fosstodon.org Ha ha! Would it surprise you to learn it was even more complex in Dublin before we had computers! There were 2 concurrent timezones here, depending on your politics for a while
-
@derickr@phpc.social 2025-01-17 22:08
@bert_hubert@fosstodon.org That's my fault! Ireland's standard time is UTC+1 (summer time) legally, and their DST jump is therefore -1 hour. I pointed that out on the tz list as an interesting fact, bit then they went ahead and actually encode it that way and that broke Java. https://github.com/eggert/tz/blob/master/europe#L369-L383
-
@natural20@mastodon.ie 2025-01-17 23:01
@bert_hubert@fosstodon.org Ah, timezones! And yeah, add in a dash of politics and software development, makes it all even more interesting!