Glyph on Nostr: Is it possible to get a zoneinfo.ZoneInfo key (i.e.: IANA tzdb identifier) for the ...
Is it possible to get a zoneinfo.ZoneInfo key (i.e.: IANA tzdb identifier) for the current system timezone, in Python? `datetime.now(timezone.utc).astimezone().` gives a potentially ambiguous 'tzname' and 'utcoffset' which make it difficult to communicate long-term time intervals to other systems
#python #datetime #timezones
Published at
2023-08-25 16:41:25Event JSON
{
"id": "0262bf2e0847daa28df1fc6a19707f782d5f631d17d68cd7ab80565fbc1f4e87",
"pubkey": "bd385aa0b579765c6883c5b0eb17e8ae350c988c659510be1e8453557ee38784",
"created_at": 1692981685,
"kind": 1,
"tags": [
[
"t",
"python"
],
[
"t",
"datetime"
],
[
"t",
"timezones"
],
[
"proxy",
"https://mastodon.social/users/glyph/statuses/110951247734721042",
"activitypub"
]
],
"content": "Is it possible to get a zoneinfo.ZoneInfo key (i.e.: IANA tzdb identifier) for the current system timezone, in Python? `datetime.now(timezone.utc).astimezone().` gives a potentially ambiguous 'tzname' and 'utcoffset' which make it difficult to communicate long-term time intervals to other systems\n\n#python #datetime #timezones",
"sig": "a16619195eb82dbd50f1c63d14bf8d58205e99028bb023653a40b7208bfd6cf5f55abe71420ddd47e9733a91dbcc15acf3f5dfff35190bd6a02343c6fcfe444c"
}