Skip to content

Commit 3750b38

Browse files
BenPortnerphilippjfr
authored andcommitted
fixed "OSError: [Errno 22] Invalid argument" for dates < 1970 (#3879)
1 parent cab8b05 commit 3750b38

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

holoviews/core/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1846,7 +1846,7 @@ def dt64_to_dt(dt64):
18461846
Safely converts NumPy datetime64 to a datetime object.
18471847
"""
18481848
ts = (dt64 - np.datetime64('1970-01-01T00:00:00')) / np.timedelta64(1, 's')
1849-
return dt.datetime.utcfromtimestamp(ts)
1849+
return dt.datetime(1970,1,1,0,0,0) + dt.timedelta(seconds=ts)
18501850

18511851

18521852
def is_nan(x):

0 commit comments

Comments
 (0)