We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99e9515 commit 0fff347Copy full SHA for 0fff347
nixio/util/util.py
@@ -9,7 +9,7 @@
9
import numpy as np
10
11
import h5py
12
-from datetime import datetime
+from datetime import datetime, timezone
13
from uuid import uuid4, UUID
14
from ..exceptions import exceptions
15
from . import names
@@ -97,7 +97,8 @@ def time_to_str(time):
97
:return: string in the form "YYYYMMDDTHHMMSS", where T is the date-time separator
98
:rtype: str
99
"""
100
- dt = datetime.utcfromtimestamp(time)
+ # dt = datetime.utcfromtimestamp(time)
101
+ dt = datetime.fromtimestamp(time, timezone.utc)
102
return dt.strftime("%Y%m%dT%H%M%S").encode("utf-8")
103
104
0 commit comments