Thursday, March 18, 2010

Converstion of second timestamp to date timestamp

Some of the login information is saved on the second time stamp. This will need to be converted into a format that your system can understand.

[root@mail ~]# date;date +%s
Fri Mar 19 10:40:32 IST 2010
1268975432

To convert the second back to IST format

[root@mail ~]# date -d '1970-01-01 1268975432 sec GMT'
Fri Mar 19 10:40:32 IST 2010

[root@mail ~]# date -d@1268975432
Fri Mar 19 10:40:32 IST 2010

=================================

No comments: