Version 13 of clock seconds

Updated 2010-10-23 11:22:43 by dkf

Returns the number of seconds since January 1st, 1970, Midnight, in Greenwich (GMT). Also known as "Unix time", "timestamp" or "epoch".

Example:

 clock seconds

on Dec 10 2004, 11:44:22, returns

 1102686262

LV Is the epoch the same on all platforms and operating systems?

KBK - If it isn't, that's a bug. The epoch is 1970-01-01T00:00:00Z - that is, 00:00 UTC at the start of 1 January 1970. It was once true that MacOS9 and below used a different epoch, but that proved to be too confusing for everyone.


RS: Find out what your epoch is, without timezone offset, with

 clock format 0 -gmt 1


See also