I am trying to read times with their timezone specified by its UTC-offset and store them as python datetimes.
The pytz
module provides the available timezones and I think the complete list is given in this question. If so, most of the times can be stored by using the corresponding Etc/
timezone and flipping the sign:
Etc/GMT
Etc/GMT+0
Etc/GMT+1
Etc/GMT+10
Etc/GMT+11
Etc/GMT+12
Etc/GMT+2
Etc/GMT+3
Etc/GMT+4
Etc/GMT+5
Etc/GMT+6
Etc/GMT+7
Etc/GMT+8
Etc/GMT+9
Etc/GMT-0
Etc/GMT-1
Etc/GMT-10
Etc/GMT-11
Etc/GMT-12
Etc/GMT-13
Etc/GMT-14
Etc/GMT-2
Etc/GMT-3
Etc/GMT-4
Etc/GMT-5
Etc/GMT-6
Etc/GMT-7
Etc/GMT-8
Etc/GMT-9
However, some timezones, like Newfoundland Standard Time and Afghanistan Time are half-hour offsets from GMT (-3:30 and +4:30, respectively). How can I store these times with their appropriate timezone without manually mapping these specific offsets to America/St_Johns
or Asia/Kabul
?