Can Walter stop living in the future? (meta)

Johannes Loher johannes.loher at fg4f.de
Thu May 16 19:24:53 UTC 2019


On Thursday, 16 May 2019 at 16:46:13 UTC, H. S. Teoh wrote:
> On Thu, May 16, 2019 at 11:59:48AM -0400, Steven Schveighoffer 
> via Digitalmars-d wrote: [...]
>> It would be cool if the server just re-timestamped things if 
>> they are so far out of date (+/- 30 minutes should be enough). 
>> I've had posts from the PAST show up, because my outbox for 
>> some reason got stuck, and I didn't notice for a few days.
> [...]
>
> Seriously, everyone should just store (and transmit) all dates 
> in UTC always. Let the software format it according to the 
> local timezone when it needs to be displayed.  Then there would 
> be no problems.
>
> But alas, I only dream...
>
>
> T

Unfortunately, this is actually not sufficient for all use cases. 
Not all dates are points in time, while dates in UTC are. E.g 
changes to timezones happen more often than you‘d expect. What if 
you set your alarm to 7:00 AM in a given timezone and then the 
timezone is adjusted to one hour earlier. Do you want to go your 
alarm to go off at 8:00 AM in that timezone now, which would be 
what you‘d get if the time was stored in UTC? Probably not, you 
want it to still go off at 7:00 AM in that timezone. Handling 
dates and time can be unexpectedly more difficult than one 
believes at first.


More information about the Digitalmars-d mailing list