Linux date

The linux date command is unixtime aware. You can have it output the seconds since the epoch with a simple command. Date followed by a plus to show it's a format, and the %s to show the seconds.

date +%s

However if you want to go the OTHER way it's really freaking ugly. I can't believe there isn't an easier way to do that!

date -d @371407800

or

date -d '1970-01-01 UTC +1097575205 seconds'

Easy.



Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 18.226.93.207
To prevent spam please submit by clicking the kitten: