Re: 2017-03-06- UTC, TImeZone, DayLight Saving Shifts, Enconding

UTC requires a table to compute deltas if any period spans a leap second. UT avoids that's issue if your optimizing for computing deltas.

Joe

> On Mar 7, 2017, at 12:15 AM, nicolas.mailhot@laposte.net wrote:
> 
> Hi,
> 
> You can already do all of this (except maybe for leap seconds, if you have an app that cares about one second every few years I feel for you), by storing every datetime in UTC (Z timezone of ISO 8601), and converting to local time in the presentation layer, with the TZ database. It's a good idea to convert using the database as a last step anyway, it avoids widespread data corruption when the database has not been updated timely on the local system. And it needs updating since governments can be fickle.
> 
> Storing anything in local time like dos-like systems like to do is a recipe for failure (I've even seen some of them invent local time UNIX timestamps !)
> 
> See also the W3C datetime profile of ISO 8601 that every one uses practically to transmit datetimes portably. It requires the sender to convert timezones to UTC offset so the rest of the software ecosystem does not have to care about it.
> 
> Regards,
> 
> -- 
> Nicolas Mailhot

Received on Tuesday, 7 March 2017 14:54:47 UTC