Simplify generation date metadata

partly because the ctime currently used is most probably not very
useful, and also it simplifies assumptions for testing.
Refactor parser to use a tokenizing pass