PHPackages                             jacobemerick/timezone-converter - 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. jacobemerick/timezone-converter

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

jacobemerick/timezone-converter
===============================

0.1.0(11y ago)3123MITPHPPHP &gt;=5.4

Since Mar 19Pushed 11y agoCompare

[ Source](https://github.com/jacobemerick/timezone-converter)[ Packagist](https://packagist.org/packages/jacobemerick/timezone-converter)[ RSS](/packages/jacobemerick-timezone-converter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

timezone-converter
==================

[](#timezone-converter)

A simply and ugly little invokable class to convert different timezone formats into IANA-approved DateTimeZones. While PHP has some awesome parsing to handle many different datetime formats, it is not so forgiving about timezones. This class helps out with this.

Usage
-----

[](#usage)

This currently supports converting between four different timezone formats. You can either define which timezone you are interested in or just throw an 'any' match at it, though that is a bit more expensive.

```
// basic instantiation
use Jacobemerick\TimezoneConverter\Converter;

$converter = new Converter(Converter::ABBREVIATION_FORMAT);
$timezone = $converter('est');
```

The `$timezone` variable is now a instance of DateTimeZone, with an internal setting of `America/New_York`.

### UTC Formats

[](#utc-formats)

UTC Formats are pretty tricky to convert between, as a UTC offset contains no contextual information about standard/daylight settings. Use this option with care.

```
$converter = new Converter(Converter::UTC_FORMAT);
$timezone = $converter('-0500'); // America/New_York
```

### Military Formats

[](#military-formats)

As military formats expect to be a hard return of an offset, without any context of daylight savings time or geographical oddities, this option returns timezones of Etc/GMT(offset). You can pass in values in either NATO phonetic alphabet or just the English letter.

```
$converter = new Converter(Converter::MILITARY_FORMAT);
$timezone = $converter('Romeo'); // Etc/GMT-5
```

### Abbreviation Formats

[](#abbreviation-formats)

Timezone abbreviations are inherently difficult to work with, as they are not as comprehensive as the IANA format and they are duplicated for several zones. The responses can be assumed to be best guess conversions.

```
$converter = new Converter(Converter::ABBREVIATION_FORMAT);
$timezone = $converter('est'); // America/New_York
```

### Rails Formats

[](#rails-formats)

There is a Rails gem that attempts to 'simplify' the default list of IANA formats into a list of 146 options. Which is great until you need to convert back.

```
$converter = new Converter(Converter::RAILS_FORMAT);
$timezone = $converter('Eastern Time (US & Canada)'); // America/New_York
```

### Other Options

[](#other-options)

For completionist sake, you can also pass in IANA timezone formats. Also, you can pass in 'any' queries, which will loop through options and try to come up with something. Consider this a last-ditch effort.

```
$converter = new Converter(Converter::IANA_FORMAT);
$timezone = $converter('America/New_York'); // America/New_York

$converter = new Converter(Converter::ANY_FORMAT);
$timezone = $converter('est'); // America/New_York
```

Installation
------------

[](#installation)

Through [composer](http://getcomposer.org):

```
$ composer require jacobemerick/timezone-converter:~0.1
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

4079d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a4eb553ed7677c6aa2c5adb9d20191557e64369c14a9d4b2371c924c4517dff?d=identicon)[jacobemerick](/maintainers/jacobemerick)

---

Top Contributors

[![jacobemerick](https://avatars.githubusercontent.com/u/527814?v=4)](https://github.com/jacobemerick "jacobemerick (12 commits)")

---

Tags

timezones

### Embed Badge

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

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

###  Alternatives

[pragmarx/countries

PHP Countries and Currencies

1.9k3.3M18](/packages/pragmarx-countries)[camroncade/timezone

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

162982.4k7](/packages/camroncade-timezone)[pragmarx/countries-laravel

Countries for Laravel

1471.1M2](/packages/pragmarx-countries-laravel)[juanparati/iso-codes

A PHP library that provides ISO codes, currencies, languages, timezones and additional geopolitical information

17146.4k](/packages/juanparati-iso-codes)

PHPackages © 2026

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