Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Langgenius Dify Timezone Data

From Leeroopedia
Knowledge Sources
Domains Frontend, Data, UserSettings
Last Updated 2026-02-12 07:00 GMT

Overview

Static JSON data file containing a comprehensive list of world timezones with human-readable display names for use in timezone selection UI components.

Description

web/utils/timezone.json is a JSON array of 318 timezone entries, each with a name (display label) and value (IANA timezone identifier). The file covers timezones from UTC-11:00 through UTC+14:00.

Each entry follows this structure:

  • name: A formatted string containing the UTC offset, the timezone name, and representative cities. For example: "-08:00 Pacific Time - Los Angeles, San Diego, San Jose, San Francisco".
  • value: The standard IANA timezone identifier (e.g., "America/Los_Angeles", "Asia/Shanghai", "Europe/London").

The entries are sorted by UTC offset from most negative (-11:00 Niue) to most positive (+14:00 Kiritimati) and cover:

  • All major world cities and their associated timezones
  • Half-hour and quarter-hour offsets (e.g., +05:30 India, +05:45 Nepal, +09:30 Australia Central, +12:45 Chatham)
  • Overseas territories and small island nations
  • Antarctic research stations

Usage

This file is imported by timezone selection components in the user account settings UI, where users choose their preferred timezone for display formatting of dates and times throughout the application.

Code Reference

Source Location

Data Structure

[
  {
    "name": "-11:00 Niue Time - Alofi",
    "value": "Pacific/Niue"
  },
  {
    "name": "-08:00 Pacific Time - Los Angeles, San Diego, San Jose, San Francisco",
    "value": "America/Los_Angeles"
  },
  {
    "name": "+00:00 Greenwich Mean Time - London, Birmingham, Liverpool, Glasgow",
    "value": "Europe/London"
  },
  {
    "name": "+08:00 China Time - Shanghai, Beijing, Shenzhen, Guangzhou",
    "value": "Asia/Shanghai"
  },
  {
    "name": "+14:00 Line Islands Time - Kiritimati",
    "value": "Pacific/Kiritimati"
  }
]

Import

import timezones from '@/utils/timezone.json'

// timezones: Array<{ name: string, value: string }>

I/O Contract

Inputs

Name Type Required Description
N/A N/A N/A Static data file; no inputs.

Outputs

Name Type Description
default Array<{ name: string, value: string }> 318 timezone entries sorted by UTC offset

Usage Examples

Timezone Selector Dropdown

import timezones from '@/utils/timezone.json'

function TimezoneSelect({ value, onChange }) {
  return (
    <select value={value} onChange={e => onChange(e.target.value)}>
      {timezones.map(tz => (
        <option key={tz.value} value={tz.value}>{tz.name}</option>
      ))}
    </select>
  )
}

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment