|
|
|
|
|
by dschuler
3059 days ago
|
|
Totally agree! I've run into this problem quite a bit, and I think storing the timezone or offset along with a UTC timestamp is the solution. In particular, I want to be able to: 1. Know when a globally ordered even happens. Using UTC or local time with offsets satisfies this requirement. 2. Know when an event occurred in local time, for example movie show times (I can't know what time to print on the ticket without getting the theater's time zone when passed in UTC). UTC does not solve this problem, but local time with offsets works. Example of when I wrote this comment: $ date -u +"%Y-%m-%dT%H:%M:%SZ"
2018-02-08T16:17:48Z
$ date +%FT%T%z
2018-02-08T08:17:48-0800
Both formats are ISO8601 compatible.Finally, many client-side requests for dates should be in local wall time without an offset or UTC. Of course this is application dependent, but I've seen this go wrong a few times. Please share other ideas/suggestions if you have them. |
|