[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] Making sense of UNIX time_t ("epoch seconds")
|
- From: "Mag Gam" <magawake@gmail.com>
- To: "Philadelphia Linux User's Group Discussion List" <plug@lists.phillylinux.org>
- Subject: Re: [PLUG] Making sense of UNIX time_t ("epoch seconds")
- Date: Sun, 15 Jul 2007 15:58:17 -0400
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=lQK9yNdTpiR9rVCV8YFvf797dXrUlxnSIR8AeGCzEvDdLXYVcqJ81zN7EOpqueMmhTys2s/8fnOKczAphDI6vRAnKMDr6Rq1EAUgf/0xgI2hInIMRNbtuiBvPJqmgy8AmkgzMAjK4mbSFMPnmcsDnGbCWw92aGd0oxfiGWVjucM=
- Reply-to: Philadelphia Linux User's Group Discussion List <plug@lists.phillylinux.org>
- Sender: plug-bounces@lists.phillylinux.org
Thankyou, and good thread.
On 7/15/07, Matthew Rosewarne <mukidohime@case.edu> wrote:
On Sunday 15 July 2007, Antony P Joseph wrote: > 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()"
Right, forgot about timezones...
> Another easier way is > $perl -e ' print gmtime(1184521826)."\n"; ' > Sun Jul 15 17:50:26 2007 > $perl -e ' print "".localtime(1184521826)."\n"; '
> Sun Jul 15 13:50:26 2007
I don't know, call me old fashioned, but I don't find anything to be easier in perl. :>
"date" can give the correct output if you tack "UTC" on the end of the
command, which would look like:
date -d "1970-01-01 $TIMESTAMP sec UTC"
___________________________________________________________________________ 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
___________________________________________________________________________
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
|
|