3 ms·
>If I record that upcoming datetime in UTC but I forgot about a daylight savings time change between now and then There are good reasons for not storing in UTC
by ubercow13 7y ago
>If I record that upcoming datetime in UTC but I forgot about a daylight savings time change between now and then
There are good reasons for not storing in UTC but this doesn't seem to be one of them. Surely the problem in this case is just that you incorrectly converted to UTC? It's just a bug.
- mbreese 7y agoDaylight saving time rules can change... Just because you stored it correctly now doesn't mean it is correct in the future (when it's needed).
- ubercow13 7y agoSure but that is a separate issue - in that case you didn't 'forget' about it
- aeorgnoieang 7y ago> Daylight saving time rules can change Which is why all of the good date-time libraries come with the standard timezone database, which contains a full history of timezone changes. So, (carefully) using one of those libraries, you should be handle to handle any date-time ever.
- mixmastamyk 7y agoTimezone dbs lag, so do not solve every problem.