cannot put my work into public domain).
This implementation has very few reasonable code (call atol() and ctime()), but has some nice standard program stuff (parse options, print help, ...).