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

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

zaengle/timezone
================

Helps manage timezones in Laravel.

0.4(5y ago)03.8kMITPHPPHP &gt;=7.0.0

Since May 20Pushed 5y ago2 watchersCompare

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

READMEChangelogDependencies (3)Versions (5)Used By (0)

Timezone Select Form Builder
============================

[](#timezone-select-form-builder)

This package is a fork from [Camron Cade](https://github.com/camroncade/timezone)modified to fit Zaengle's usage. For more information, read Camron's [helpful article](https://www.camroncade.com/managing-timezones-with-laravel/) on managing timezones in Laravel. The array of timezones and their underlying keys were taken from the repository by [tamaspap](https://github.com/tamaspap/timezones).

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

[](#installation)

Recommended installation of this package is through composer. Run the following snippet to add Timezone to your project:

```
composer require zaengle/timezone

```

***Note:** You may jump to Usage if you are on Laravel 5.5+*

Once this operation completes, the final step is to add the service provider. Open `config/app.php`, and add a new item to the service providers array.

```
'Zaengle\Timezone\TimezoneServiceProvider'

```

In order to use the Facade, update the aliases array as such:

```
`Timezone` => `Zaengle\Timezone\Facades\Timezone`,

```

Now it's ready for use!

Usage
-----

[](#usage)

### Timezone Convert Helper Functions

[](#timezone-convert-helper-functions)

The package includes two helper functions that make it easy to deal with displaying and storing timezones, `convertFromUTC()` and `convertToUTC()`:

Each function accepts two required parameters and a third optional parameter dealing with the format of the returned timestamp.

```
Timezone::convertFromUTC($timestamp, $timezone, $format);
Timezone::convertToUTC($timestamp, $timezone, $format);

```

The first parameter accepts a timestamp, the second accepts the name of the timezone that you are converting to/from. The option values associated with the timezones included in the select form builder can be plugged into here as is. Alternatively, you can use any of [PHP's supported timezones](http://php.net/manual/en/timezones.php).

The third parameter is optional, and default is set to `'Y-m-d H:i:s'`, which is how Laravel natively stores datetimes into the database (the `created_at` and `updated_at` columns).

### Building a select form

[](#building-a-select-form)

Using the `Timezone::toSelectArray()` you can build an array of enabled timezones similar to this:

```
[
    "America/Los_Angeles" => "(UTC-08:00) Pacific Time (US &amp; Canada)",
    "US/Mountain" => "(UTC-07:00) Mountain Time (US &amp; Canada)",
    "US/Central" => "(UTC-06:00) Central Time (US &amp; Canada)",
    "US/Eastern" => "(UTC-05:00) Eastern Time (US &amp; Canada)",
]

```

Then, in your Blade template you have control over formatting:

```

    @foreach(Timezone::toSelectArray() as $key=>$val)
        timezone === $val) selected @endif>{!! $key !!}
    @endforeach

```

### Customizing timezones

[](#customizing-timezones)

If you want to customize which timezones are displayed in the `toSelectArray()` method, publish the package configuration file and enable/disable individual timezones:

```
php artisan vendor:publish --tag=config --provider="Zaengle\Timezone\TimezoneServiceProvider"

```

### Credits

[](#credits)

[Camron Cade](https://github.com/camroncade/timezone)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.3% 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

Every ~660 days

Total

4

Last Release

2034d ago

PHP version history (2 changes)0.1PHP &gt;=5.4.0

0.2PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1ffae66f8a3c9ea283079e6e74e520b39fd68a00dab4485aee819a69c0f3fa25?d=identicon)[jesseschutt](/maintainers/jesseschutt)

---

Top Contributors

[![camroncade](https://avatars.githubusercontent.com/u/5819714?v=4)](https://github.com/camroncade "camroncade (14 commits)")[![jesseschutt](https://avatars.githubusercontent.com/u/353047?v=4)](https://github.com/jesseschutt "jesseschutt (5 commits)")[![kyranb](https://avatars.githubusercontent.com/u/5426926?v=4)](https://github.com/kyranb "kyranb (3 commits)")[![davidavz](https://avatars.githubusercontent.com/u/6774576?v=4)](https://github.com/davidavz "davidavz (1 commits)")[![iconjenchua](https://avatars.githubusercontent.com/u/9497419?v=4)](https://github.com/iconjenchua "iconjenchua (1 commits)")

---

Tags

timezonestimezone

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[camroncade/timezone

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

162982.4k7](/packages/camroncade-timezone)[glhd/laravel-timezone-mapper

Timezone mapper for Laravel

45284.4k](/packages/glhd-laravel-timezone-mapper)[juanparati/iso-codes

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

17146.4k](/packages/juanparati-iso-codes)[joy2362/php-time-zone

A simple package that provide list of all timezone that php support

162.0k](/packages/joy2362-php-time-zone)

PHPackages © 2026

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