Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm reading my console logs and trying to figure out how to interpret the time stamp that console displays:

Time 1332251808
TimeNanoSec 72951500

I also have another time stamp that reads:

Time 1232456005

If anyone can shed some light on this it would be appreciated. Thanks!

share|improve this question
up vote 2 down vote accepted

Those are Unix time stamps, ie, the number of seconds since the Unix epoch (Jan 1 1970):

# date -d @1332251808
Tue Mar 20 13:56:48 GMT 2012

# date -d @0
Thu Jan  1 00:00:00 GMT 1970
share|improve this answer
thanks — that makes sense; is there an equivalent command to date -d for the nano seconds? – Mr. President Mar 20 '12 at 14:31
↳ does the command above display the time or set it? on my console the command to display the number of seconds since epoch is date -r 1332251808 resulting in Tue Mar 20 06:56:48 MST 2012 – Mr. President Mar 20 '12 at 14:37
For me it displays, my -r option is to get the last modification date of a file. 72951500 nano seconds is 0.072951500 seconds, so you can just add them on, either before or after calling date. – Jamie Kitson Mar 20 '12 at 14:44
awesome, thank you. – Mr. President Mar 20 '12 at 14:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .