Fix the Y2K38 bug

Adds support for timestamps before 1970 and beyond year 2038.