Skip to content
Permalink
Browse files

fix DST timezone issue in scoreboard image

  • Loading branch information...
frozenpandaman committed Feb 7, 2019
1 parent 706d98e commit f2009b53a822136ea9b50da83890c13d600393ad
Showing with 1 addition and 1 deletion.
  1. +1 −1 splatnet2statink.py
@@ -55,7 +55,7 @@
if "app_timezone_offset" in config_data:
app_timezone_offset = str(config_data["app_timezone_offset"])
else:
app_timezone_offset = str(int(time.timezone/60))
app_timezone_offset = str(int((time.timezone/60)-60)) if time.localtime().tm_isdst else str(int(time.timezone/60))

if "app_unique_id" in config_data:
app_unique_id = str(config_data["app_unique_id"])

6 comments on commit f2009b5

@fetus-hina

This comment has been minimized.

Copy link
Contributor

replied Feb 7, 2019

FYI: Lord Howe Island (Australia) has a special summer time (DST) setting which shifts 30 minutes from their standard(winter) time.
Standard: UTC+10:30, Summer: UTC+11:00
I don't know there are users on that island. (Probably not, because there are only 300-400 people live)

@frozenpandaman

This comment has been minimized.

Copy link
Owner Author

replied Feb 7, 2019

What the… I never knew this. So weird. Wikipedia also says: "A one-hour shift is customary but twenty minute and two hour shifts have been used in the past."

Anyway, interesting – thanks! If I can think of another (easy) way to account for this extreme edge case, I'll change it to that. Otherwise, those (non-existent, in reality) users will just have to suffer for half of the year. :P

@fetus-hina

This comment has been minimized.

Copy link
Contributor

replied Feb 7, 2019

Summer time in 2 hours was discussed (in 2018!) in Japan as well, for "2020 Tokyo Olympic Games".
https://www.sankei.com/politics/news/180806/plt1808060002-n1.html

Of course, it's cancelled.

@frozenpandaman

This comment has been minimized.

Copy link
Owner Author

replied Feb 7, 2019

I remember that! 😁

@frozenpandaman

This comment has been minimized.

Copy link
Owner Author

replied Feb 7, 2019

In any non-one-hour-DST cases, users can add the app_timezone_offset custom key. 😉

@frozenpandaman

This comment has been minimized.

Copy link
Owner Author

replied Feb 8, 2019

@fetus-hina Better method implemented in 5f3c26f 😛

Please sign in to comment.
You can’t perform that action at this time.