File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ def memorized_timedelta(seconds):
2424 _timedelta_cache [seconds ] = delta
2525 return delta
2626
27- _epoch = datetime .fromtimestamp (0 , tz = timezone .utc )
27+ _epoch = datetime .fromtimestamp (0 , tz = timezone .utc ). replace ( tzinfo = None )
2828_datetime_cache = {0 : _epoch }
2929
3030
@@ -33,8 +33,8 @@ def memorized_datetime(seconds):
3333 try :
3434 return _datetime_cache [seconds ]
3535 except KeyError :
36- # NB. We can't just do datetime.fromtimestamp(seconds, tz=timezone.utc) as this
37- # fails with negative values under Windows (Bug #90096)
36+ # NB. We can't just do datetime.fromtimestamp(seconds, tz=timezone.utc).replace(tzinfo=None)
37+ # as this fails with negative values under Windows (Bug #90096)
3838 dt = _epoch + timedelta (seconds = seconds )
3939 _datetime_cache [seconds ] = dt
4040 return dt
You can’t perform that action at this time.
0 commit comments