2017 © Pedro Peláez
 

php timezone

image

yongtiger/timezone

  • Thursday, March 16, 2017
  • by yongtiger
  • Repository
  • 1 Watchers
  • 0 Stars
  • 43 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Timezone v0.0.3 (public static function timezone_format)

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

FEATURES

USAGE

  • Usecase #1: using sort flags
$tzs = TimeZone::timezone_list(TimeZone::SORT_BY_OFFSET);
  • This will generate an array looking like:
[Pacific/Midway] => (UTC-11:00) Pacific/Midway
[Pacific/Pago_Pago] => (UTC-11:00) Pacific/Pago_Pago
[Pacific/Niue] => (UTC-11:00) Pacific/Niue
[Pacific/Honolulu] => (UTC-10:00) Pacific/Honolulu
[Pacific/Fakaofo] => (UTC-10:00) Pacific/Fakaofo
...
  • Usecase #2: customized your own static::$timezones
TimeZone::$timezones = DateTimeZone::listIdentifiers();
$tzs = TimeZone::timezone_list();
  • Usecase #3: using output format template
$tzs = TimeZone::timezone_list(TimeZone::SORT_BY_OFFSET, '(GMT{offset_prefix}{offset_formatted}) {timezone}');
$tzs = TimeZone::timezone_list(TimeZone::SORT_BY_OFFSET, '(GMT{offset_prefix}{offset_formatted})');
$tzs = TimeZone::timezone_list(TimeZone::SORT_BY_OFFSET, '(UTC{offset_prefix}{offset}) - {timezone}');
  • Usecase #4: using timezone output format template
echo TimeZone::timezone_format($timeZone)

NOTES

DOCUMENTS

SEE ALSO

  • http://stackoverflow.com/questions/1727077/generating-a-drop-down-list-of-timezones-with-php
  • http://stackoverflow.com/questions/24059235/php-sort-an-array-by-value-and-for-equal-values-sort-by-key
  • http://stackoverflow.com/questions/31183575/access-array-key-using-uasort-in-php
  • http://php.net/manual/en/function.uksort.php
  • http://stackoverflow.com/questions/4755704/php-timezone-list
  • https://gist.github.com/Xeoncross/1204255
  • https://randomdrake.com/2008/08/06/time-zone-abbreviation-difficulties-with-php/

TODO

Development roadmap

LICENSE

Timezone is released under the MIT license, see LICENSE file for details., (*2)

The Versions

16/03 2017

dev-master

9999999-dev http://www.branbook.cc

  Sources   Download

MIT

The Requires

  • php >=5.5

 

timezone

16/03 2017

v0.0.3

0.0.3.0 http://www.branbook.cc

  Sources   Download

MIT

The Requires

  • php >=5.5

 

timezone

16/03 2017

v0.0.2

0.0.2.0 http://www.branbook.cc

  Sources   Download

MIT

The Requires

  • php >=5.5

 

timezone

16/03 2017

v0.0.1

0.0.1.0 http://www.branbook.cc

  Sources   Download

MIT

The Requires

  • php >=5.5

 

timezone

16/03 2017

v0.0.0

0.0.0.0 http://www.branbook.cc

  Sources   Download

MIT

The Requires

  • php >=5.5

 

timezone