How about using Julian date? The representation of the milliseconds since unix epoch seems to be too short. Julian date can represent the wider range of timestamp (from 4713 BC to 294276 AD) as well as requires only  a signed INT64. Its maximum precision 6. PostgreSQL uses the Julian date. The following link contains its implementation: http://doxygen.postgresql.org/interfaces_2ecpg_2pgtypeslib_2timestamp_8c_source.html. Thanks!