I am currently working with apscheduler with multiple users located in different timezones.
There is no possibility to get the timezone from them automatically, so I need to do this with input data. Using a city is not that obvious to me as some might live in villages or near cities that are within timezones defined by other cities. So I was wondering, is there a possibility to do so using something like pytz module with a difference in hours with the server or is there anything better?
Pytz says the only way possible to do so is like:
amsterdam = timezone('Europe/Amsterdam')
But there is a city-defined timezone, which is not that universal. I want to unload the user as much as I can and free them from unnecessary work of looking up the suitable timezone for each predefined one.
I feel stuck and out of ideas. No success on the Internet so far.
a city-defined timezone, which is not that universalon the contrary, the IANA timezone database is used by everyone. It's the de-facto (if not the only) standard.'Europe\Amsterdamdoesn't mean you live in Amsterdam but in the timezone where Amsterdam is part of. A country can change its timezone rules at any time, so using the cities instead of egWestern Europeis far more stable and more granular. After all, Spain and the UK are in different timezone for political reasons"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna". And presumably people outside of those 6 cities don't have trouble figuring out whether it's the right timezone for them.