Epoch Question

R

raodeepak

Hi,

I just got a log file which has timestamps like thess which i am not
able to comprehend

1141114190, 266410
1141114190, 267059

on so on. I am assuming that the first column is the epoch time stamp
in seconds and the second column is milliseconds (?)

Can someone guide me on how i can convert that back to a timeformat
like

02/28/2006 06:50:12.884951401 or vice versa. Till now all ive found is
epoch convertors can convert only to the second, and not millisecond

Thanks
dr
 
A

Anno Siegel

Hi,

I just got a log file which has timestamps like thess which i am not
able to comprehend

1141114190, 266410
1141114190, 267059

on so on. I am assuming that the first column is the epoch time stamp
in seconds and the second column is milliseconds (?)

Can someone guide me on how i can convert that back to a timeformat
like

02/28/2006 06:50:12.884951401 or vice versa. Till now all ive found is
epoch convertors can convert only to the second, and not millisecond

Forget about the milliseconds. Since the epoch starts on a full second,
you can just add them on later. For the epoch seconds, see
perldoc -f localtime.

Anno
 
B

brian d foy

Forget about the milliseconds. Since the epoch starts on a full second,
you can just add them on later. For the epoch seconds, see
perldoc -f localtime.

The perlfaq4 man page has several examples too, and I find the DateTime
module very useful. :)
*** Free account sponsored by SecureIX.com ***
*** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com ***
 
J

John W. Krahn

Shouldn't that be (reverse each component and remove .dilavni for email
address) or (remove .invalid and reverse each component for email address)?

:)


John
 
A

A. Sinan Unur

Shouldn't that be (reverse each component and remove .dilavni for
email address) or (remove .invalid and reverse each component for
email address)?

:)

Good catch ;-)

Sinan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top