I'm using an API that returns "1391759952.7056" as a timestamp. I was wondering what the numbers behind the dot mean? As far as I know only 10 characters get used for Epoch time ...
No. epoch time is how time is kept track of internally in UNIX. It's seconds, counting upward from January 1st, 1970. This number hit 1 million (1,000,000) in March of 1973, and will hit one billion (1,000,000,000) on Sun Sep 9 01:46:39 2001 UTC.
POSIX defines that you can deduce the number of days since The Epoch (1970-01-01 00:00:00Z) by dividing the timestamp by 86400. This deliberately and consciously ignores leap seconds.
=(A1 / 86400) + 25569 Format the result cell for date/time, the result will be in GMT time (A1 is the cell with the epoch number). For other time zones: =((A1 +/- time zone adjustment) / 86400) + 25569.
January 1st, 1970 at 00:00:00 UTC is referred to as the Unix epoch. Early Unix engineers picked that date arbitrarily because they needed to set a uniform date for the start of time, and New Year's Day, 1970, seemed most convenient.
Definitely fractions of a second, see https://en.wikipedia.org/wiki/ISO_8601
Run a couple of tests from the command line:
$ date -Ins -d@1452550837
2016-01-11T22:20:37,000000000+0000
$ date -Ins [email protected]
2016-01-11T22:20:37,010000000+0000
$ date -Ins [email protected]
2016-01-11T22:20:37,000010000+0000
Tends to be inconvenient when parsing Unix times in Go.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With