Mike Chirico on 15 Jul 2007 18:35:40 -0000 |
On Sun, Jul 15, 2007 at 02:14:56PM -0400, Antony P Joseph wrote: > Hi > On Sun, 2007-07-15 at 13:52 -0400, Matthew Rosewarne wrote: > > > through a number of online converters and perl scripts, I found a good way to > > do it with plan old /bin/date: > > > > date -d "1970-01-01 $TIMESTAMP sec" > > > > So for example, if you entered: > > > > date -d "1970-01-01 1184521826 sec" > There is a catch here epoch is in GMT. While date will look into local > time variable. So the correct will be date -d " local epoch time()" > It's easy to correct for GMT, just append GMT after sec. date -d "1970-01-01 1184521826 sec GMT" Which will give the following, correct, local time. Sun Jul 15 13:50:26 EDT 2007 Regards, Mike ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|