logoalt Hacker News

NooneAtAll3today at 5:39 PM1 replyview on HN

why UTC and not epoch then?


Replies

SoftTalkertoday at 5:58 PM

Epoch (a/k/a "unix timestamps") are OK when you just need an incrementing relative time. When you start converting them back and forth to real calendar dates, times, with time zones, DST, leap seconds, etc. the dragons start to emerge.

A lesson I learned pretty early on is always use the date-time datatypes and libraries your language or platform gives you. Think very carefully before you roll your own with integer timestamps.