Hacker News new | ask | show | jobs
by vinodc 2271 days ago
The author has helpfully open-sourced the scripts as well, some of which are quite helpful like this one to convert dates to unix time and back: https://github.com/brandon-rhodes/homedir/blob/master/bin/%2...

Agree with the commit message; I've probably spent way too much time the past decade firing up a python prompt or using an online epoch converter to do this.

1 comments

  date -d @$1 +%Y-%m-%d
$ date -R Gets you very close with fewer characters
I mean, if you're not fixed on the output format, then date +%c.