mirror of
https://github.com/kennethreitz/maya.git
synced 2026-06-05 06:46:14 +00:00
Explicitly specifiy time struct when getting UTC offset for current time
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user