pel/timezone

A class that simplifies timezone picking.

dev-master 2019-05-10 01:20 UTC

This package is not auto-updated.

Last update: 2024-05-25 16:28:28 UTC


README

Build Status

timezone

About

A PSR-4 PHP class for creating a timezone picker dropdown menu.

Loading

include('Timezone.php');
$timezone = new Pel\Helper\Timezone;

Usage

// Get the pure list, $timezone_identifier => $display
// Then create the menu how you like.
foreach ($timezone::getList() as $timezone_identifier => $display) {
    echo '<option value="' . $timezone_identifier . '">' . $display . '</option>';
}

// OR

// Echo the menu directly.
echo $timezone::getMenu();