4 ms·
Timezone logic has much more to do than just DST. You've got places like Kabul in Afghanistan where the timezone is 1/2 hour off the normal hourly zone (UTC +4
by donarb 5y ago
Timezone logic has much more to do than just DST.
You've got places like Kabul in Afghanistan where the timezone is 1/2 hour off the normal hourly zone (UTC +4:30). You've got countries that want to be aligned with their neighbors for commerce so normal timezone boundaries have exceptions.
- forkLding 5y agoI know, I've developed with timezone logic for international settings, I've even dealt with international tax logic which is far worse. However timezones, although they are geographical, are also social and political constructs, hence why all of China is under one timezone (China Standard Time) even though it spans 5 geographical time zones. Daylight savings time is also a political invention (there is no such thing as a 23-hr day existing, yet it exists in Daylight Savings Time, which again makes coding assumptions weird if you really need precise timezone logic which I ended up needing, take that with the fact that only certain countries implement DST and you will have a great time coding for international times). I'm suggesting removing the political timezones (those times were added for productivity and workers or legacy reasons, but really we no longer work on farms and factories all the time now) from timezone logic and go by geographical timezones so we don't have to estimate timezones and time by grabbing your current city and then comparing it a list of cities and then figure out the timezone that way.