Skip to content

Commit fcff93b

Browse files
committed
chore: Force a realod to get re-run datetime parsing with configure tz
1 parent 424ec9d commit fcff93b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/test_server.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,24 @@ def test_server_updatedAt_timezone(plex):
3737
try:
3838
# no timezone configured, should be naive
3939
setDatetimeTimezone(False)
40+
plex.reload()
4041
dt_naive = plex.updatedAt
4142
assert dt_naive.tzinfo is None
4243

4344
# local timezone configured, should be aware
4445
setDatetimeTimezone(True)
46+
plex.reload()
4547
dt_local = plex.updatedAt
4648
assert dt_local.tzinfo is not None
4749

4850
# explicit IANA zones. Check that the offset is correct too
4951
setDatetimeTimezone("UTC")
52+
plex.reload()
5053
dt: datetime = plex.updatedAt
5154
assert dt.tzinfo is not None
5255
assert dt.tzinfo.utcoffset(dt) == timedelta(0)
5356
setDatetimeTimezone("Asia/Dubai")
57+
plex.reload()
5458
dt: datetime = plex.updatedAt
5559
assert dt.tzinfo is not None
5660
assert dt.tzinfo.utcoffset(dt) == timedelta(hours=4)

0 commit comments

Comments
 (0)