Re: Time format in log files

From: Dancer <dancer@dont-contact.us>
Date: Thu, 20 Aug 1998 21:53:00 +1000

Joerg Oertel wrote:
>
> Can someone explain the log file timestamp format ( like 903459502.172) explain
> to me? How does it translate to Aug 18 18:40 (or such)?

The first number (before the '.') is what is commonly called a 'standard
unix timestamp'. Many (most?) operating systems keep track of time, or
deliver a sense of time by keeping track of the number of seconds that
have elapsed since 'Epoch'.

'Epoch' was the first of January, 1970. Time zero was the first second
of the first day of January, that year. If you divide the timestamp by
86400 seconds, you get the number of days between now and then (plus
change)..and so on.

Bizarrely enough, for those that haven't used these much, they are a
delightfully easy system to use. You can figure the phase of the moon,
manage intervals, and many similar common tasks all with one
easy-to-parse value. They're also not subject to the 'year 2000 bug'.
(Although most systems use 32-bit storage for them, and they will run
out in...umm..2034, I think...however, the systems can be (and in some
cases have already been) transparently upgraded to 64-bit storage, which
should keep us for quite a few centuries more)

The number portion of the timestamp after the '.' is the millisecond at
which the event occured. Therefore, that part ranges from 0 to 999. If
you don't require that sort of precision, you can safely ignore it.

D
Received on Tue Aug 18 1998 - 17:54:57 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:41:39 MST