3 ms·
Time is one of those libs that you don't try to implement on your own. It's one of those things that sound simple on the face of it, but you soon find out there
by lordnacho 6y ago
Time is one of those libs that you don't try to implement on your own. It's one of those things that sound simple on the face of it, but you soon find out there's a huge number of complications. Things like locales having different daylight savings, which require a DB to keep track of, and might change in the future. Historically baked in weirdness like the thing in this SO answer. The international dateline. Arizona having its own TZ. Half hour countries. Cultural specific calendars like Jewish or Arab. It's a cave of horrors.
At best, try to understand that if you do use something other than epoch time, you might have to record a bunch of stuff like what I mentioned.
- ben-schaaf 6y agoComputerphile has a great video on this: https://www.youtube.com/watch?v=-5wpm-gesOY https://www.youtube.com/watch?v=-5wpm-gesOY