3 ms·
On macOS (Catalina-10.15.7), it looks like it is fixed or uses an updated version of the libc library mentioned in the article Expected: $ TZ=LOL_THIS_DOESNT_
by xyst 6y ago
On macOS (Catalina-10.15.7), it looks like it is fixed or uses an updated version of the libc library mentioned in the article
Expected:
$ TZ=LOL_THIS_DOESNT_EXIST date
Sat 10 Jul 2021 12:00:00 AM LOL
Actual:
$ TZ=LOL_THIS_DOESNT_EXIST date
Wed Feb 10 17:02:02 UTC 2021
Otherwise I agree with the article. Have told so many co-workers that storing your dates in anything other than UTC will bite you in the ass later on. Converting it to the relevant time zone for display purposes is a trivial operation.
- exporectomy 6y agoIt's not as simple as UTC everywhere. If you're representing a fixed point in time, independent of any local time, then yes. But sometimes, a date/time is relative to the local time zone and in those cases, the local time zone is the correct one to store it in. For example, scheduled times for future events in the real world such as appointments. You can't store it as UTC because you can't know what the time zone offset will be in the future since that's a political decision.