3 ms·
An ISO date with timezone can be useful, if you would like to know the timezone when a particular bit of data was recorded.
by bartvk 6y ago
An ISO date with timezone can be useful, if you would like to know the timezone when a particular bit of data was recorded.
- crote 6y agoIf you mean ISO 8601 and its "2007-04-05T12:30-02:00" timezone thingy, not really. It doesn't store a timezone, but a UTC offset. Which is a problem because the UTC offset of a timezone may change. This happens rarely enough that people do indeed use "ISO 8601 + offset" to store "timezoned" timestamps, but often enough that it'll probably end up corrupting your data sooner or later.
- Joker_vD 6y agoWell, usually what you want is actully the UTC offset, not the timezone, because that's what you need to get the actual-wall-clock timestamp of the event. If you all you have is a timzeone, then you need an accurate historical tzdata and also you need to be sure that the system had accurate tzdata itself when it produced the timestamp. Of course, if you're storing the timestamp of a future, planned event, then yes, you need a timezone. But for historical records, store the UTC offset that was in effect when the event happened.