PHPackages                             scottconnerly/timezone - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. scottconnerly/timezone

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

scottconnerly/timezone
======================

Bringing Ruby on Rails' time zone list to PHP.

v0.2(8y ago)337.6k4GPL-2.0-onlyPHP

Since Mar 27Pushed 8y ago1 watchersCompare

[ Source](https://github.com/scottconnerly/timezone)[ Packagist](https://packagist.org/packages/scottconnerly/timezone)[ RSS](/packages/scottconnerly-timezone/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

TimeZoneSelect
==============

[](#timezoneselect)

Creating a time zone select in PHP can get unruly quickly, as DateTimeZone::listIdentifiers() returns over 415 Zones and Links. This is an attempt to take a page from Ruby on Rails' ActiveSupport::TimeZone time\_zone\_select(), largely by using their curated list of about 150 Zones, and also by allowing for 'priority\_zones' to be at the top of the list.

[![Screenshot of timezone select](timezone-select-screenshot.png?raw=true "Screenshot of timezone select")](timezone-select-screenshot.png?raw=true)

Example:

`echo TimeZoneSelect::get_select(['country'=>'US']);`

Simple demo avaiable:

Available args w/ default values:

```
[
    'country'        => '',          //ISO-3116 2-letter country code
    'priority_zones' => [],          //If you want to specify a list of zones that aren't country-specific
    'priority_label' => 'Regional',  //The label of the optgroup for the priority zones

    'selected'       => '',          //which option is selected

    'name'           => 'time_zone', //name for the
    'class'          => '',          //class for the
    'id'             => '',          //id for the
    'data'           => [],          //list of data attributes to add to the
]

```

- This repo involves occasionally scraping the rails repo. Here is the ticket asking Rails to make their data file more easily accessible: [rails/rails#22088](https://github.com/rails/rails/issues/22088)
- It would be much easier if there was a similarly curated list inside of PHP. Here's the request to them for that:

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3022d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1088240?v=4)[Scott Connerly](/maintainers/scottconnerly)[@scottconnerly](https://github.com/scottconnerly)

---

Top Contributors

[![scottconnerly](https://avatars.githubusercontent.com/u/1088240?v=4)](https://github.com/scottconnerly "scottconnerly (9 commits)")

---

Tags

hacktoberfesthacktoberfest2020timezone

### Embed Badge

![Health badge](/badges/scottconnerly-timezone/health.svg)

```
[![Health](https://phpackages.com/badges/scottconnerly-timezone/health.svg)](https://phpackages.com/packages/scottconnerly-timezone)
```

###  Alternatives

[brick/date-time

Date and time library

3663.8M109](/packages/brick-date-time)[jamesmills/laravel-timezone

Timezone storage and retrieval for Laravel

698793.8k13](/packages/jamesmills-laravel-timezone)[camroncade/timezone

Helps manage timezones in Laravel. Includes &lt;select&gt; form builder for timezones.

1591.0M12](/packages/camroncade-timezone)[jackiedo/timezonelist

A small package use to create a timezone list box in Laravel

111648.2k1](/packages/jackiedo-timezonelist)[dater/dater

Compact PHP library for working with date/time in different formats &amp; timezones.

14484.2k](/packages/dater-dater)[tapp/filament-timezone-field

Filament timezone field.

57351.0k8](/packages/tapp-filament-timezone-field)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
