Weave Code
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 Bundle Laravel Package

bertrandom/timezone-bundle

View on GitHub
Deep Wiki
Context7

Readable Timezone Field Type for Symfony2

The stock Symfony2 timezone field type organizes all of the Olson Timezone Identifiers in PHP by Continent and displays them to the user. This dropdown is pretty bad from a UI perspective. This bundles provides an alternate dropdown that is similar to the one found when choosing a time zone on a Windows computer.

This is my first symfony2 bundle, feedback welcome!

Installation

Edit your deps file and add the following:

[BertTimezoneBundle]
    git=git://github.com/bertrandom/BertTimezoneBundle.git
    target=/bundles/Bert/TimezoneBundle

Run the vendors install script:

bin/vendors install

This will pull down the latest version of this bundle from github. Alternatively you can just put the files in /vendor/bundles/Bert/TimezoneBundle

Next, add the namespace to the end of the registerNamespaces bit in autoload.php:

Add the bundle in AppKernel.php:

That's it, the field type should be ready to use.

Usage

Simply use the field type readabletimezone in your form builder, e.g.:

Data

The data is taken from the work of two blog posts on the subject of readable timezones:

Presenting a list of Timezones to the user

Olson Time Zone Database to Standard Windows Time Zone v0.1

I've made mirrors of these two posts and put them in Resources/source/mirrors/ in case the blog posts go away.

The timezone data itself can be found in Resources/config/timezones.yml

Credits

Bertrand Fan (bertrand@fan.net)

Timezone data provided by Avi Block and Tim Davis, see Data section for more details.

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.
comsave/common
alecsammon/php-raml-parser
chrome-php/wrench
lendable/composer-license-checker
typhoon/reflection
mesilov/moneyphp-percentage
mike42/gfx-php
bookdown/themes
aura/view
aura/html
aura/cli
povils/phpmnd
nayjest/manipulator
omnipay/tests
psr-mock/http-message-implementation
psr-mock/http-factory-implementation
psr-mock/http-client-implementation
voku/email-check
voku/urlify
rtheunissen/guzzle-log-middleware