Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



  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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: