MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / load_timezones

Function load_timezones

Scripts/Developer Base/Smart Notes.py:38–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36
37# Load timezones
38def load_timezones():
39 try:
40 from zoneinfo import available_timezones
41 tzs = sorted([t for t in available_timezones() if '/' in t])
42 if tzs:
43 return tzs
44 except Exception:
45 pass
46 try:
47 import pytz
48 return sorted(list(pytz.all_timezones))
49 except Exception:
50 pass
51 return sorted([
52 'UTC', 'Europe/Athens', 'Europe/London', 'Europe/Berlin', 'Europe/Paris',
53 'America/New_York', 'America/Los_Angeles', 'America/Chicago', 'Asia/Tokyo',
54 'Asia/Shanghai', 'Asia/Kolkata', 'Asia/Dubai', 'Australia/Sydney',
55 'Pacific/Auckland', 'Africa/Johannesburg'
56 ])
57
58# Load countries
59def load_countries():

Callers 1

Smart Notes.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected