3 ms·
I used to prefer unix timestamps too. But I Saw The Light. For one: those standard Unix tools can convert from date/time values to timestamps just as easy. Arg
by berkes 5y ago
I used to prefer unix timestamps too. But I Saw The Light.
For one: those standard Unix tools can convert from date/time values to timestamps just as easy. Arguably easier.
And a timestamp is merely an Int, so many languages, databases, APIs and so on, lack ergonomic methods to convert timestamps to datetimes. But have easy ways to do the reverse. It's almost always easier to convert dates, times or datetimes to timestamp ints (or floats) than to convert an int or float to a date, datetime or time.
A timestamp.toString() is unfamiliar to humans, a datetime.toString() is not. The list of small benefits in favor of actual date or time types just goes on.