Stable /api/timezones

Timezone selector

Select an IANA timezone from World’s normalized timezone dataset.

IANA identifiers 428 zones Searchable names Country relationships

Installation

Install once, use everywhere.

composer require nnjeim/world:^2.0
php -d memory_limit=1G artisan world:install

React, Angular, and Vue consume the same Laravel API; no frontend package is required.

For the default database cache, run application migrations first. Existing 1.x users should review the 2.0 upgrade guide or stay with the 1.x documentation.

Playground

Live behavior and copy-ready code.

Timezone selector

Connecting to the World API…

Live preview

Selected value

Loading…

component.blade.php
Loading example…

API reference

Request only the fields you need.

GET /api/timezones?search=Europe/Bucharest
Endpoint
/api/timezones
Fields used
id, name

Component contract

Props

NameTypeDefaultDescription
name string timezone_id Submitted form-field name.
value number|null null Initially selected timezone ID.
search boolean true Enables filtering by IANA name.
disabled boolean false Prevents selection changes.

Events

change Timezone

Emitted after a timezone is selected.

loading boolean

Reports API loading state.

error Error

Reports an unavailable or invalid response.

Validation guidance

  • Submit the numeric timezone ID or canonical IANA name.
  • Resolve offsets at runtime because daylight saving rules change.
  • Store timestamps in UTC.

Accessibility checklist

  • ✓Read slash-separated names as human-readable labels.
  • ✓Expose search results count.
  • ✓Keep the canonical IANA value available.
  • ✓Do not communicate UTC offset by color alone.