This shows you the differences between two versions of the page.
time_calculations [2013/05/14 12:44] root |
time_calculations [2013/09/19 08:17] (current) root |
||
---|---|---|---|
Line 14: | Line 14: | ||
- | ==== Epoch time on system without GNU date ==== | + | ==== Current Epoch time on system without GNU date ==== |
perl -e 'print time(), "\n" ' | perl -e 'print time(), "\n" ' | ||
| | ||
- | ==== Convert from Epoch with perl ==== | + | ==== Convert from Epoch to date with GNU date ==== |
+ | |||
+ | date -d @<EPOCH time> | ||
+ | Example: | ||
+ | date -d @1368023418 | ||
+ | Wed May 8 16:30:18 CEST 2013 | ||
+ | |||
+ | |||
+ | ==== Convert from Epoch to date with perl ==== | ||
| | ||
perl -e "print scalar(localtime(1268727836))" | perl -e "print scalar(localtime(1268727836))" |