Timestamp bug for years before 1970 and after 2038

Adds support for timestamps before 1970 and beyond year 2038.