Skip to content

Commit

Permalink
Fix tz offset causing KeyError in Genshin
Browse files Browse the repository at this point in the history
  • Loading branch information
seriaati committed Sep 5, 2024
1 parent 5edba73 commit fd20177
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions genshin/client/components/gacha.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ async def _get_gacha_page(
# America: UTC-5, Europe: UTC+1, others are UTC+8
tz_offsets = {"os_usa": -13, "os_euro": -7}
tz_offset = tz_offsets.get(data["region"], 0)

tz_offset = data["region_time_zone"]
if game is types.Game.STARRAIL:
tz_offset -= 8 # Star rail returns UTC+n for this value
else:
tz_offset = data["region_time_zone"]
if game is types.Game.STARRAIL:
tz_offset -= 8 # Star rail returns UTC+n for this value

return data["list"], tz_offset

Expand Down

0 comments on commit fd20177

Please sign in to comment.