bitbot-irc / bitbot

https://bitbot.dev | Python3 event-driven modular IRCv3 bot 🤖

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

you cannot check the time of the north pole

xfnw opened this issue · comments

expected behavior

BitBot will tell you the time of the location

observed behavior

BitBot will not respond when you check the time of the north pole.

<vulpine> time north pole
<vulpine> time south pole
-BitBot- [Time] It is 2020-11-10 12:15:28 UTC+13 in South Pole

this bug was found by @kiedtl a few weeks ago, but it seems he was too busy to file an issue

commented

This isn't a bug.

Antarctica/South_Pole exists and is UTC +12 or +13 depending on daylight saving time, per the zoneinfo database.

The North Pole does not have permanent settlement or an assigned timezone, and therefore does not have a standardized time. See https://en.wikipedia.org/wiki/North_Pole#Time for more info.

bitbot's location settings seem to disagree

<vulpine> c u location north pole
-BitBot- [Config] Config 'location' set to {'timezone': 'GMT-12',
         'lat': 90.0, 'lon': 0.0, 'name': 'North Pole'}

this is a problem of the reverse geocoding API we use and the timezone library we use disagreeing and im not excited about trying to explicitly exclude known-to-be-invalid timezones, but guess I'll have to

commented

More specifically, it's the geocoding API spitting out GMT offsets for locations like the North Pole that don't have a zoneinfo timezone assigned to them.

If anything, the bug here is that GMT offsets are shown and stored in location config, I could see it making sense to check for and null those, but it's more of an implementation detail than anything else.

this should adequately destroy this inconsistency 8cc47a9