Ive tried all the above however, i am getting the following. i have Solaris 10 installed. Is there any function that i could use to get the time 10 mins ago. or any suggestions:
> date -d'10 min ago' '+%F %H:%M:%S'
date: illegal option -- d
date: illegal option -- 1
date: illegal option -- 0
date: illegal option --
date: illegal option -- m
date: illegal option -- i
date: illegal option -- n
date: illegal option --
date: invalid argument -- go
usage: date [-u] mmddHHMM[[cc]yy][.SS]
date [-u] [+format]
date -a [-]sss[.fff]
> date +"%s" -d "Fri Apr 24 13:14:39 CDT 2009"
%s
> date -ud @1000000000
date: illegal option -- d
usage: date [-u] mmddHHMM[[cc]yy][.SS]
date [-u] [+format]
date -a [-]sss[.fff]
>
>
You'll either have to install GNU date or you'll need to write a program. You could use perl (if that helps). Just make sure you have the Date:Calc module.... you might be able to do something reasonable without that perl module.
How to calculate unix epoch time with DC(Caulator)
--------------------------------------------------------------------------------
Hi All,
I have a similar problem:
In our code we are using below code to calculate the UNIX Epoch Time from the time stamp present in the file.
Can any one explain how the DC operates in below command and how we calculate the UNIX EPOCH time from this.
Date incide the file is 20:26:51
Output we get is 1289943554
File content:
0|0|4|472|2010-11-15 23:22:14|2010-11-15 23:30:06
0|0|3|200|2010-11-15 20:26:51|2010-11-15 20:30:11
Can you please explain.