| 36 | |
| 37 | # Load timezones |
| 38 | def 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 |
| 59 | def load_countries(): |