DEV Community

Discussion on: Do you prefer unix epoch (a number) or ISO 8601 (a string) for timestamps?

Collapse
 
xngwng profile image
Xing Wang

yeah, the problem is that there is no standard way.

Stripe APIs use epoch.
Twitter and Dropbox APIs use ISO 8601.

So just curious what about people's preferences.

Collapse
 
rhymes profile image
rhymes

I wouldn't be surprised if Stripe chose unix epochs because they interact with third party bank or credit card systems and that makes their lives easier or because they store payment events in a time series DB and their DB uses unix timestamps. Maybe after validating the payload, they ship it to some queue and that gets written as is to a DB.

Or maybe they just chose by tossing a coin :D