3 ms·
"Always manipulate in UTC" fails for datetime distance computation. Two very common examples: For a recurring scheduled event, "Same time tomorrow" may require
by PeterisP 10y ago
"Always manipulate in UTC" fails for datetime distance computation.
Two very common examples:
For a recurring scheduled event, "Same time tomorrow" may require adding 24, 23 or 25 hours to the UTC time, depending on the TZ.
The question "how many full days have elapsed between two timestamps?" may need to return 1 for 23.5 hour distance or 0 for 24.5 hour distance depending on the TZ.
I'd be so happy if we all could agree that a day always has 24 hours, but that doesn't seem likely any time soon.