Added support for dates <= 1901 in format_time