Occasionally I work with a database that stores dates and datetimes as UNIX timestamps, a.k.a. the number of seconds since midnight 1970-01-01. Unlike the original author of the database and surrounding code, I cannot convert between UNIX timestamps and human-readable date formats in my head, so I write tools for that.
Our goal here is to write a small tool that converts back and forth between UNIX timestamps and dates/times:
$ autotime 2015-12-24
1450915200
$ autotime 2015-12-24 11:23:00
1450956180
$ autotime 1450915200
2015-12-24
$ autotime 1450956180
2015-12-24 11:23:00