4 ms·
Public Service Announcement: Use UTC. http://yellerapp.com/posts/2015-01-12-the-worst-server-setup-you-can-make.html http://yellerapp.com/posts/2015-01-12-the
by endymi0n 11y ago
Public Service Announcement:
Use UTC.
http://yellerapp.com/posts/2015-01-12-the-worst-server-setup-you-can-make.html http://yellerapp.com/posts/2015-01-12-the-worst-server-setup...
- masklinn 11y agoThe script just seems to assume whichever date is in the mtime field is a local time.
- Piskvorrr 11y agoExactly. So, if every server (or a significant fraction) reports in UTC, the heuristic is no longer reliable.
- briankwest 11y agoCame here to say exactly this!
- api 11y agoI always always always write code to just use the numeric time in seconds or milliseconds since the epoch. Time is only converted into messy Gregorian cruft to display to the user. Anything else is begging for crazy bugs. In a SQL database a time field should be an unsigned bigint.
- rtkwe 11y agoWhile that works it'd be a real annoyance to deal with when doing a lot of the debugging queries I wind up writing for work doing batch ETL. As far as I have found there's no built in function that would take that epoch timestamp and convert it into a usable date that could then be truncated for daily binning etc.