Fix the Y2K38 bug

Adds support for timestamps beyond year 2038.