3 ms·
Things get really fun when you are asked to be able to sort these ambiguous dates. Let's say Event A happens in New York (Eastern Time Zone) at 2018-12-08 02:0
by testplzignore 8y ago
Things get really fun when you are asked to be able to sort these ambiguous dates.
Let's say Event A happens in New York (Eastern Time Zone) at 2018-12-08 02:00 UTC, and is recorded as occurring on 2018-12-07 (with no time) local time. Then let's say Event B happens in London (GMT) at 2018-12-08 01:00 UTC, and is recorded as occurring on 2018-12-08 (with no time) local time. Which event happened first? If we know the UTC times, a reasonable person would say Event B happened first. But if we just have the local dates with no times, we either say that Event A happened first, or we say we don't know.
This is a real problem I have to deal with and it is a pain. One user says A happened first, another says B happened first, another says A and B happened at the same time, and I say "give me the UTC time or you don't get this feature" :)
- jrochkind1 8y agoThen you can talk about Russia's Gregorian calendar switch. The day the Russian revolution began on 25 October 1917, it was 7 November 1917 in England.
- oftenwrong 8y ago$ cal 9 1752 September 1752 Su Mo Tu We Th Fr Sa 1 2 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
- jrochkind1 8y agoNot in Russia that wasn't the calendar in September of 1752! Apparently the `cal` command assumes certain geographic areas when it shows you calendars...
- oftenwrong 8y agoIt assumes you follow the calendar of the British Empire https://en.wikipedia.org/wiki/Calendar_(New_Style)_Act_1750 https://en.wikipedia.org/wiki/Calendar_(New_Style)_Act_1750
- PaulHoule 8y agoExactly, timezone-aware dates do not have a total ordering but they do have a partial ordering. Most of the time you can say if they are greater than or equal to but sometimes you can't.