Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Timezone Laravel Package

camroncade/timezone

Laravel package for working with timezones. It provides curated timezone identifier lists, select-menu helpers, and validation support, making it easy to build timezone pickers and user settings without maintaining your own arrays. Includes offset helpers for timezone-aware forms.

Deep Wiki
Context7

Functions for helping manage timezones in Laravel. Includes form builder for timezones.

Frequently asked questions about Timezone
How do I install camroncade/timezone in a Laravel application?
Install it with Composer using composer require camroncade/timezone. The package ships a service provider and facade, so registration is handled automatically on Laravel versions that support package auto-discovery. You can optionally publish its config file if you need to tweak defaults, then call the facade from a Blade template or controller.
Does camroncade/timezone work with Laravel 10, Laravel 11, and PHP 8.1 or 8.2?
Probably not out of the box. The last release was April 2019, well before Laravel 6 through 11 and PHP 8.x landed, so Composer version constraints, service provider registration, return type declarations, and dynamic property deprecations may all break. Run a short spike install against your target Laravel and PHP versions before committing, and be prepared to fork and patch compatibility yourself.
How do I render a grouped timezone select dropdown in a Blade template?
Call the package facade in your Blade view and it returns a complete HTML select element with timezones grouped into optgroups by region such as Africa, America, Asia, and Europe. The output is plain HTML with no JavaScript or front-end dependencies, so it works in Blade, Livewire, or any server-rendered form. You can pass a selected value and custom attributes directly to the call.
Can I get the timezone list as an array instead of a rendered select element?
Yes. The package exposes the grouped timezone data as a plain PHP array so you can build your own markup, feed an API response, or use it in a custom view. This is useful when your front end needs a JSON list or when you want full control over the option markup.
How do I set a default selected timezone or add custom attributes to the select element?
The select helper accepts a selected value so the matching option is marked as chosen when the form loads, which is handy for editing an existing user profile. It also accepts an attributes argument so you can add classes, an id, name, required, or data attributes to the generated select tag. Both options are configured per call, so different forms can use different settings.
Is camroncade/timezone still maintained?
It appears to be dormant. The last release was 2019-04-15 and the repository URL is reported as unknown, which means source code, issue tracker, CI status, and security advisories cannot be inspected. For many teams that alone fails dependency policy review because supply-chain provenance is unverifiable.
What are the alternatives to camroncade/timezone for a Laravel timezone picker?
The most common alternative is to build it yourself as a small helper or Blade component wrapping PHP's DateTimeZone::listIdentifiers(DateTimeZone::ALL_WITH_BC), optionally grouped by region. That removes the dependency entirely and gives you full control over markup and tests. A timezone picker is commodity functionality, so build-over-buy is often the pragmatic choice unless you need something beyond a grouped select.
Does camroncade/timezone validate submitted timezone values?
The package is primarily a list and select-menu helper, so treat any validation support as a convenience rather than a security boundary. Always validate server-side that the submitted identifier exists in DateTimeZone::listIdentifiers() before storing it. This protects you even if you later replace the package with your own component.
Can I safely use camroncade/timezone in production or should I fork it?
The risk is low in absolute terms because the package is a thin wrapper around PHP's timezone database with no network, persistence, or auth surface. The real concern is that an unmaintained dependency with an unverifiable repository creates audit and CVE-scanning friction. If you adopt it, fork at a known-good commit, host it in your own VCS or private Packagist, pin to the fork, and retain the MIT license and attribution.
How do I test a timezone picker built with camroncade/timezone?
Write feature tests that assert every rendered option value is a valid entry from DateTimeZone::listIdentifiers(), so bad data fails fast. Also cover the default selected value, custom attribute passthrough, and the grouped array output if you consume it directly. If you fork or replace the package, put the internal component behind the same call signature so existing tests keep passing.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo