|
|
|
|
|
by xgbi
2294 days ago
|
|
And it better not. Timezone information has nothing to do in a timestamp. A timestamp is a point in time, whatever the time is in Paris or Tokyo. It is an abstract value and it is way better this way. A timezone is a filter through which you display your timestamp, and it tells you what your local time was when that timestamp occurred. So yeah, always store and exchange time information as timestamps. Timezone is extra styling information, just like CSS. |
|
There are lots of examples like this. Some time events you want to happen at absolute time points (in which case time zones are only for display purposes), but very often your events need to be ”time-zone aware”. There is no universal rule, and thinking that there is will lead to all sorts of trouble.