Skip to content

Instantly share code, notes, and snippets.

@jepler
Created September 10, 2024 15:09
Show Gist options
  • Save jepler/860557eefa9174095873f526c2c09470 to your computer and use it in GitHub Desktop.
Save jepler/860557eefa9174095873f526c2c09470 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import os
import datetime
import pytz
now = datetime.datetime.now(datetime.UTC)
sz = set()
for tz in pytz.all_timezones:
zone = pytz.timezone(tz)
local = now.astimezone(zone)
if local.hour != 17: continue
z = local.strftime("%Z")
if z in sz: continue
sz.add(z)
print(f"{local.strftime('%H:%M %Z'):10} - {zone}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment