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 35
35
### incase people are using threading, we lock file reads
36
36
lock = threading .Lock ()
37
37
38
- PY36 = (
38
+ PY36_OR_LATER = (
39
39
sys .version_info .major == 3 and sys .version_info .minor >= 6
40
40
)
41
41
@@ -289,9 +289,9 @@ def encode_as_numpy(obj):
289
289
@staticmethod
290
290
def encode_as_datetime (obj ):
291
291
"""Attempt to convert to utc-iso time string using datetime methods."""
292
- # In PY36, isoformat() converts UTC
292
+ # Since PY36, isoformat() converts UTC
293
293
# datetime.datetime objs to UTC T04:00:00
294
- if not (PY36 and (isinstance (obj , datetime .datetime ) and
294
+ if not (PY36_OR_LATER and (isinstance (obj , datetime .datetime ) and
295
295
obj .tzinfo is None )):
296
296
try :
297
297
obj = obj .astimezone (pytz .utc )
You can’t perform that action at this time.
0 commit comments