Explicitly specifiy time struct when getting UTC offset for current time

This commit is contained in:
Timo Furrer
2018-04-02 12:09:31 +02:00
parent 00a0ceb3c8
commit d0d5a8f75d
+1 -1
View File
@@ -68,7 +68,7 @@ def test_struct():
ts = time.localtime(now)
m = maya.MayaDT.from_struct(ts)
dt = Datetime.fromtimestamp(
time.mktime(ts) - maya.core.utc_offset(), pytz.UTC
time.mktime(ts) - maya.core.utc_offset(ts), pytz.UTC
)
assert m._epoch is not None
assert m.datetime() == dt