MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / get

Method get

core/api_views.py:484–508  ·  view source on GitHub ↗
(self, request)

Source from the content-addressed store, hash-verified

482 description="Get list of all supported timezones",
483 )
484 def get(self, request):
485 import pytz
486
487 # Get all common timezones (excludes deprecated ones)
488 all_timezones = sorted(pytz.common_timezones)
489
490 # Group by region for better UX
491 grouped = {}
492 for tz in all_timezones:
493 if '/' in tz:
494 region = tz.split('/')[0]
495 if region not in grouped:
496 grouped[region] = []
497 grouped[region].append(tz)
498 else:
499 # Handle special zones like UTC, GMT, etc.
500 if 'Other' not in grouped:
501 grouped['Other'] = []
502 grouped['Other'].append(tz)
503
504 return Response({
505 'timezones': all_timezones,
506 'grouped': grouped,
507 'count': len(all_timezones)
508 })
509
510
511# ─────────────────────────────

Callers 15

delete_periodic_taskFunction · 0.45
updateMethod · 0.45
get_is_dismissedMethod · 0.45
_init_clientMethod · 0.45
get_pubsub_clientMethod · 0.45
dispatch_event_systemFunction · 0.45
log_system_eventFunction · 0.45
get_host_and_portFunction · 0.45

Calls

no outgoing calls