我正在玩弄日期的极端值并意识到一个奇怪的行为:
# 1. normal date in nanoseconds
print(np.datetime64('2020-04-14T00:00:00.000000', 'ns'))
# 2. extreme year date in nanoseconds
print(np.datetime64('-32020-04-14T00:00:00.000000', 'ns'))
# 3. extreme year date as year-month-day
print(np.datetime64('-32020-04-14T00:00:00.000000', 'D'))
给出:
2020-04-14T00:00:00.000000000
1884-06-01T23:24:35.153993728
-32020-04-14
我想知道为什么中间转换给出了完全错误的日期/时间?