Download the PHP package onesandzeros/silverstripe-timezones without Composer
On this page you can find all versions of the php package onesandzeros/silverstripe-timezones. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download onesandzeros/silverstripe-timezones
More information about onesandzeros/silverstripe-timezones
Files in onesandzeros/silverstripe-timezones
Package silverstripe-timezones
Short Description Provides time zone data as well as a pre-populated dropdown field for SilverStripe
License BSD-3-Clause
Homepage https://github.com/spekulatius/silverstripe-timezones
Informations about the package silverstripe-timezones
SilverStripe Time zones FormField module
Provides a reusable model and data of the time zones worldwide. In addition a dropdown field for a time zones selection is included.
Requirements
- SilverStripe Framework 4.0
Installation
For the installation you can either download the package, unzip it into your project directory and run dev build manually or run the following commands in your project directory:
The data will automatically populated on dev build.
Provided Data
The provided data comes from PHPs built-in function timezone_identifiers_list()
.
Before the data gets saved in the db it will be prepared so its ready to be
used.
Dropdown Field
If you want to use the dropdown field you can simply add a timezone to your db fields:
Format of time zone
You can change the default format of the time zone in the dropdown menu by
creating a file mysite/_config/timezone.yml
and adding e.g.
You can use 'Name', 'Region' and 'Identifier' in the string and it will be replaced proper.
* [Future ideas/development, issues](https://github.com/spekulat/silverstripe-timezones/issues),
* [Contributing](https://github.com/spekulat/silverstripe-timezones/blob/master/CONTRIBUTING.md),
* [License](https://github.com/spekulat/silverstripe-timezones/blob/master/license.md)