date -d ‘<Unix epoch> <epoch date> sec’
e.g. date -d ’1970-01-01 988822888 sec’ would dated “Wed May 2 17:31:28 MYT 2001″
20080430 :
get a particular date in epoch, e.g. date -d ‘Apr 30 2008 00:00:00′ ‘+%s’
Related posts:
This entry was posted on Sunday, April 13th, 2008 at 12:06 pm and is filed under Apple, Open Source, Systems. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
About |
Privacy Policies |
Contact Us
takizo, not takezo is proudly powered by
WordPress
Entries (RSS)
and Comments (RSS).
51 queries. 0.517 seconds.
July 14th, 2008 at 6:05 pm
why not use the following?
date -d ‘@’
e.g. date -d @1216024547
Mon Jul 14 10:35:47 CEST 2008
November 18th, 2008 at 6:03 pm
Hi,
I trying to convert epoch seconds to D/M/Y H:M:S.s format. I am passing epoch seconds as an argument to perl file.
Inside perl file, the code looks like this:
my $epoch = $ARGV[0];
open(OUT, “>c:/dateResultFile.txt”);
my $str = “date -d ’1970-01-01 $epoch sec’” ;
print OUT “$str\n”;
close(OUT);
when i executed this code, i am getting i am not getting the date as i expected.
Please suggest me the solution.
July 31st, 2009 at 5:04 am
$ date +%s -d”Jan 1, 1980 00:00:01″
date: 0551-402 Invalid character in date/time specification.
Usage: date [-u] [+"Field Descriptors"]
System used is AIX…this doesn’t work