Commit 29fba07c authored by nmartensen's avatar nmartensen
Browse files

datetime.from_excel(): do not jump at datevalue 1

--HG--
branch : 3.0
parent adf4d66fc628
Pipeline #17711 passed with stage
in 4 minutes and 45 seconds
......@@ -91,7 +91,7 @@ def from_excel(value, offset=CALENDAR_WINDOWS_1900):
diff = datetime.timedelta(milliseconds=round(fraction * SECS_PER_DAY * 1000.))
if 0 <= value < 1 and diff.days == 0:
return days_to_time(diff)
if 1 < value < 60 and offset == CALENDAR_WINDOWS_1900:
if 1 <= value < 60 and offset == CALENDAR_WINDOWS_1900:
value += 1
parts = list(jd2gcal(MJD_0, value + offset - MJD_0))
jumped = (parts[-1] == 0 and fraction > 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment