Closed andrewnc closed 4 years ago
Ah, this appears to be a limitation of how I handle negative offsets from the Unix epoch (1970-01-01). It looks like non-leap years are aren't being calculated correctly.
>>> Timestamp("1960-01-01")
Timestamp("1960-01-01 00:00:00")
>>> Timestamp("1961-01-01")
Timestamp("1961-01-02 00:00:00")
>>> Timestamp("1962-01-01")
Timestamp("1962-01-02 00:00:00")
>>> Timestamp("1963-01-01")
Timestamp("1963-01-02 00:00:00")
>>> Timestamp("1964-01-01")
Timestamp("1964-01-01 00:00:00")
This very well could be expected behavior, and my inexperience working with datetimes is coming through. In the case below, I would have expected the date to be at the beginning of January 1st, instead of at the end.
>>> Timestamp("1946-01-01")
Timestamp("1946-01-02 00:00:00")