À la fin de la journée, je ne pense pas qu'il y est une bonne solution pour les pré-abattage le trop grand liste de fuseaux horaires... Et les enjeux m'ont fait décider de commencer avec un décemment de classe de taille. Je poste ici car il y avait des gens qui étaient intéressés. Espérons que ma solution va aider quelqu'un d'autre aussi.
Ce qu'il fait:
Vous permet de créer une liste de fuseaux horaires de l'ensemble de la liste à l'intérieur de PHP
Vous permet de créer une liste à partir de votre propre pré-cuite définitions, calcuating actuel décalages horaires.
Vous permet de créer une liste par pays.
Dé-duplique fuseaux horaires avec la même abréviation. Notez que je n'ai pas fait beaucoup de recherches pour voir si il y a des doublons dans la liste que je ne devrais pas être de se débarrasser de. Il est assez intelligent pour savoir que, même si deux fuseaux horaires peut signaler la même abréviation (par exemple, MST pour Arizona), qu'il va plus loin en si ou non le fuseau horaire de l'heure d'été prend en charge à tout moment de l'année.
Sorties soit assez configurable HTML (sans descendre dans le modèle de route) ou JSON pour Ajax ou JavaScript en ligne.
Calcule le courant de décalage horaire pour chaque fuseau horaire. Notez que ce n'est pas statique... il va changer tout au long de l'année.
Fournit de grandes quantités de sucre pour l'usage du monde réel.
Ce qu'il n'a pas à faire:
- Séparer les pays ou les continents par le biais d'un "OptGroup". Depuis que je suis déjà de faire un tri par décalage UTC, cela semblait qu'il allait causer plus de confusion qu'il allait se soulager.
Les choses que je pourrais ajouter un jour:
Construire le code HTML de modèle au lieu de inline comme ça.
Des sélecteurs supplémentaires, comme la prise d'un éventail de pays, au lieu d'un seul.
De regroupement, mais comme je l'ai mentionné ci-dessus, je suis en bas sur le faire.
Le Code est assez humide. Il existe quelques légères style de codage des divergences.
Possibilité de spécifier un "préféré" liste des noms conviviaux. Par exemple, bien que les "Dawson" est un parfait candidat viable pour être listé comme 'la' ville pour la PDT, car il fait partie de la PST groupe principal et observe l'heure d'été... une ville d'un peu plus de 1000 habitants ne devrait pas battre Los Angeles, San Francisco, Seattle, Vancouver ou juste parce qu'il montre d'abord sur le plan lexical.
Raw de sortie, de sorte que personne ne soit lié à la simple "toSelect" et "la méthode toJson' méthodes.
En général, il devrait convenir à mes besoins comme est. Il gère correctement tous les fuseaux horaires, je suis familier avec, et tous ceux que j'ai besoin pour mon projet actuel. Malheureusement, mon champ de la connaissance des centres pour la plupart autour de la US & Western Europe.
Est-il parfait? Probablement pas. Heureux d'entendre parler de tous les problèmes/bugs/améliorations de quiconque pourrait en avoir avec ce code, car il est susceptible de vent dans ma bibliothèque permanente. Si quelqu'un pense que je suis forte... laissez-moi savent que trop. Qui a été le point de l'ensemble de cette question était de trouver le meilleur moyen de représenter un fuseau horaire sélecteur avec précision, ce qui est plutôt utile pour les utilisateurs finaux.
TimezoneList.php:
<?php
class TimezoneList
{
public $timezones = array();
private $_initialized = false;
private $_dt_now;
private $_utc;
function __construct($grouped = false)
{
$this->_utc = new DateTimeZone('UTC');
$this->_dt_now = new DateTime('now', $this->_utc);
}
// Public Static Alternate Constructors
public static function byCountry($countryKey)
{
$retVal = new TimezoneList();
$retVal->_setList($countryKey);
return $retVal;
}
public static function fromTimezones(Array $tzArr)
{
$retVal = new TimezoneList();
foreach ($tzArr as $tzItem)
{
$retVal->timezones[] = $tzItem;
}
$retVal->_initialized = true;
return $retVal;
}
public static function fromIdentifierList($timezoneList, $friendlyNames = NULL)
{
$retVal = new TimezoneList();
if ($friendlyNames)
{
if (count($timezoneList) != count($friendlyNames)) throw new Exception('Array count mismatch in TimezoneBuilder::fromList');
}
// I'd normally use a foreach pattern, but since friendlyNames is optional, this seemed the way to go.
for ($ii = 0; $ii < count($timezoneList); $ii++)
{
$pTimezoneEx = new TimezoneExtended($timezoneList[$ii]);
if ($friendlyNames)
{
$pTimezoneEx->friendlyName = $friendlyNames[$ii];
}
$retVal->timezones[] = $pTimezoneEx;
}
$retVal->_initialized = true;
return $retVal;
}
// Private Statics
// Private utility function [ Thanks to Zubair1 ]
private static function _formatOffset($offset)
{
$hours = $offset / 3600;
$remainder = $offset % 3600;
$sign = $hours > 0 ? '+' : '-';
$hour = (int)abs($hours);
$minutes = (int)abs($remainder / 60);
$sign = (($hour == 0) && ($minutes == 0)) ? ' ' : $sign;
return $sign.str_pad($hour, 2, '0', STR_PAD_LEFT).':'.str_pad($minutes,2, '0');
}
// Publics
public function getUniqueTimezoneList($countryKey = null)
{
$this->_initialize();
$outArr = array();
$usedTzs = array();
foreach ($this->timezones as $timezoneEx)
{
if (!(in_array($timezoneEx->currentKey, $usedTzs)))
{
$usedTzs[] = $timezoneEx->currentKey;
$outArr[] = $timezoneEx;
}
}
usort($outArr,array('self','_orderByOffset'));
return self::fromTimezones($outArr);
}
// In final code, I'll use a PHP include with output buffering as a template.
public function toSelect($displayOffset = true, $displayCurrent = true, $selected = array(), Array $options = array())
{
$pOpts = array();
$pItems = array();
foreach ($options as $key=>$option)
{
$pOpts[] = ' '.$key.'="'.$option.'"';
}
if (!is_array($selected)) $selected = array($selected);
$outVal = '<select'.implode('', $pOpts).'>'."\n";
foreach ($this->timezones as $timezoneEx)
{
$offset = '';
$selectionAttr = '';
if (in_array($timezoneEx->tzkey, $selected))
{
$selectionAttr = ' selected="selected"';
}
if ($displayOffset)
{
$offset = ' ['.$timezoneEx->currentAbbr.' '.self::_formatOffset($timezoneEx->currentOffset);
if ($displayCurrent && (!($timezoneEx->observesDst))) $offset .= ' ( Does not observe DST ) ';
$offset .= ']';
}
$pItems[] = "\t".'<option value="'.$timezoneEx->tzkey.'"'.$selectionAttr.'>'.$timezoneEx->friendlyName.$offset.'</option>';
}
$outVal .= implode("\n", $pItems)."\n".'</select>';
return $outVal;
}
public function toJson()
{
$outArr = array();
foreach ($this->timezones as $timezoneEx)
{
$outArr[] = $timezoneEx->toShallowArray();
}
return json_encode($outArr);
}
// Privates
private function _initialize()
{
if ($this->_initialized) return;
$this->_setList();
}
private function _orderByOffset($a, $b)
{
if( $a->currentOffset == $b->currentOffset ){ return 0 ; }
return ($a->currentOffset < $b->currentOffset) ? -1 : 1;
}
private function _setList($countryKey = NULL)
{
$this->timezones = array();
$listType = ($countryKey) ? DateTimeZone::PER_COUNTRY : DateTimeZone::ALL;
$tzIds = DateTimeZone::listIdentifiers($listType, $countryKey);
foreach ($tzIds as $tzIdentifier)
{
$this->timezones[] = new TimezoneExtended($tzIdentifier);
}
$this->_initialized = true;
}
}
class TimezoneExtended
{
const START_YEAR = 'January 1st';
const MID_YEAR = 'July 1st';
private static $_dt_startYear = NULL; // Static so that we don't have to rebuild it each time we go through.
private static $_dt_midYear = NULL;
private static $_dtz_utc = NULL;
private static $_dt_now = NULL;
private $_baseObj;
public $tzkey;
public $friendlyName;
public $currentKey; // Current Key contains the friendly Timezone Key + whether this timezone observes DST.
// This is unique across the US & Canada. Unsure if it will be unique across other Timezones.
public $currentAbbr;
public $currentOffset;
public $currentlyDst;
public $observesDst = false; // Defaults to off
function __construct($tzKey)
{
if (empty(self::$_dtz_utc)) self::$_dtz_utc = new DateTimeZone('UTC');
if (empty(self::$_dtz_now)) self::$_dt_now = new DateTime('now', self::$_dtz_utc);
if (empty(self::$_dt_startYear)) self::$_dt_startYear = new DateTime(self::START_YEAR, self::$_dtz_utc);
if (empty(self::$_dt_midYear)) self::$_dt_midYear = new DateTime(self::MID_YEAR, self::$_dtz_utc);
$this->tzkey = $tzKey;
$this->_baseObj = new DateTimeZone($tzKey);
if ($this->_baseObj == NULL) throw new Exception('Invalid Timezone Key');
foreach ($this->_baseObj->getTransitions(self::$_dt_startYear->getTimestamp()) as $transition)
{
if ($transition['isdst']) $this->observesDst = true;
}
foreach ($this->_baseObj->getTransitions(self::$_dt_midYear->getTimestamp()) as $transition)
{
if ($transition['isdst']) $this->observesDst = true;
}
$this->friendlyName =str_replace('_',' ',array_pop(explode('/',$tzKey)));
$pTransition = $this->_baseObj->getTransitions(self::$_dt_now->getTimestamp());
$this->currentAbbr = $pTransition[0]['abbr']; // With a Timestamp, we should only get one transition.
$this->currentlyDst = $pTransition[0]['isdst'];
$this->currentKey = $this->currentAbbr.'_'.$this->observesDst;
$this->currentOffset = $this->_baseObj->getOffset(self::$_dt_now);
}
public function toShallowArray()
{
$outArr = array(
'tzkey'=>$this->tzkey,
'friendlyName'=>$this->friendlyName,
'currentOffset'=>$this->currentOffset/3600,
'observesDst'=>$this->observesDst,
'currentlyDst'=>$this->currentlyDst,
'currentAbbr'=>$this->currentAbbr
);
return $outArr;
}
}
Ouf. Voici des exemples d'utilisation (timezones.php):
<?php
include_once 'TimezoneList.php';
/* Example 1: Get Select Box by Country Code */
$tzl = TimezoneList::byCountry('US');
$tzl = $tzl->getUniqueTimezoneList();
echo $tzl->toSelect(true,true,'America/Los_Angeles');
echo "\n".'<br />'."\n";
/* Example 2: Get a list by country code, output as JSON for AJAX (or similar uses) */
$_REQUEST['country_code'] = 'US'; // Hack for quick usage.
$tzl_ajax = TimezoneList::byCountry($_REQUEST['country_code']);
$tzl_ajax = $tzl_ajax->getUniqueTimezoneList();
echo '<script type="text/javascript">'."\n";
echo 'var foo = '.$tzl_ajax->toJson().';';
echo "\n".'</script>';
echo "\n".'<br />'."\n";
/* Example 3: Get Select Box from a list of TZDs + friendly names */
$tzl2 = TimezoneList::fromIdentifierList(
array('America/Los_Angeles','America/Boise','America/Phoenix','America/Chicago','America/New_York'),
array('Pacific','Mountain','Mountain (Arizona)','Central','Eastern')
);
// Example shows setting extra properties on the <SELECT>.
echo $tzl2->toSelect(true,false,'America/Los_Angeles',
array('style'=>'font-size:15px; border:1px solid #ccc; padding:4px', 'id'=>'timezone_list', 'class'=>'standard-list', 'name'=>'timezone')
);
echo "\n".'<br />'."\n";
/* Example 4: Get a raw list of timezones */
$tzl3 = new TimezoneList(true);
$tzl3 = $tzl3->getUniqueTimezoneList();
echo $tzl3->toSelect(true,false,'America/Los_Angeles');
Et voici le code de sortie à partir des exemples dans timezones.php:
<select>
<option value="Pacific/Honolulu">Honolulu [HST -10:00 ( Does not observe DST ) ]</option>
<option value="America/Adak">Adak [HADT -09:00]</option>
<option value="America/Anchorage">Anchorage [AKDT -08:00]</option>
<option value="America/Phoenix">Phoenix [MST -07:00 ( Does not observe DST ) ]</option>
<option value="America/Los_Angeles" selected="selected">Los Angeles [PDT -07:00]</option>
<option value="America/Boise">Boise [MDT -06:00]</option>
<option value="America/Chicago">Chicago [CDT -05:00]</option>
<option value="America/Detroit">Detroit [EDT -04:00]</option>
</select>
<br />
<script type="text/javascript">
var foo = [{"tzkey":"Pacific\/Honolulu","friendlyName":"Honolulu","currentOffset":-10,"observesDst":false,"currentlyDst":false,"currentAbbr":"HST"},{"tzkey":"America\/Adak","friendlyName":"Adak","currentOffset":-9,"observesDst":true,"currentlyDst":true,"currentAbbr":"HADT"},{"tzkey":"America\/Anchorage","friendlyName":"Anchorage","currentOffset":-8,"observesDst":true,"currentlyDst":true,"currentAbbr":"AKDT"},{"tzkey":"America\/Phoenix","friendlyName":"Phoenix","currentOffset":-7,"observesDst":false,"currentlyDst":false,"currentAbbr":"MST"},{"tzkey":"America\/Los_Angeles","friendlyName":"Los Angeles","currentOffset":-7,"observesDst":true,"currentlyDst":true,"currentAbbr":"PDT"},{"tzkey":"America\/Boise","friendlyName":"Boise","currentOffset":-6,"observesDst":true,"currentlyDst":true,"currentAbbr":"MDT"},{"tzkey":"America\/Chicago","friendlyName":"Chicago","currentOffset":-5,"observesDst":true,"currentlyDst":true,"currentAbbr":"CDT"},{"tzkey":"America\/Detroit","friendlyName":"Detroit","currentOffset":-4,"observesDst":true,"currentlyDst":true,"currentAbbr":"EDT"}];
</script>
<br />
<select style="font-size:15px; border:1px solid #ccc; padding:4px" id="timezone_list" class="standard-list" name="timezone">
<option value="America/Los_Angeles" selected="selected">Pacific [PDT -07:00]</option>
<option value="America/Boise">Mountain [MDT -06:00]</option>
<option value="America/Phoenix">Mountain (Arizona) [MST -07:00]</option>
<option value="America/Chicago">Central [CDT -05:00]</option>
<option value="America/New_York">Eastern [EDT -04:00]</option>
</select>
<br />
<select>
<option value="Pacific/Midway">Midway [SST -11:00]</option>
<option value="Pacific/Niue">Niue [NUT -11:00]</option>
<option value="Pacific/Apia">Apia [WST -11:00]</option>
<option value="Pacific/Tahiti">Tahiti [TAHT -10:00]</option>
<option value="Pacific/Honolulu">Honolulu [HST -10:00]</option>
<option value="Pacific/Rarotonga">Rarotonga [CKT -10:00]</option>
<option value="Pacific/Fakaofo">Fakaofo [TKT -10:00]</option>
<option value="Pacific/Marquesas">Marquesas [MART -09:30]</option>
<option value="America/Adak">Adak [HADT -09:00]</option>
<option value="Pacific/Gambier">Gambier [GAMT -09:00]</option>
<option value="America/Anchorage">Anchorage [AKDT -08:00]</option>
<option value="Pacific/Pitcairn">Pitcairn [PST -08:00]</option>
<option value="America/Dawson_Creek">Dawson Creek [MST -07:00]</option>
<option value="America/Dawson">Dawson [PDT -07:00]</option>
<option value="America/Belize">Belize [CST -06:00]</option>
<option value="America/Boise">Boise [MDT -06:00]</option>
<option value="Pacific/Easter">Easter [EAST -06:00]</option>
<option value="Pacific/Galapagos">Galapagos [GALT -06:00]</option>
<option value="America/Resolute">Resolute [CDT -05:00]</option>
<option value="America/Cancun">Cancun [CDT -05:00]</option>
<option value="America/Guayaquil">Guayaquil [ECT -05:00]</option>
<option value="America/Lima">Lima [PET -05:00]</option>
<option value="America/Bogota">Bogota [COT -05:00]</option>
<option value="America/Atikokan">Atikokan [EST -05:00]</option>
<option value="America/Caracas">Caracas [VET -04:30]</option>
<option value="America/Guyana">Guyana [GYT -04:00]</option>
<option value="America/Campo_Grande">Campo Grande [AMT -04:00]</option>
<option value="America/La_Paz">La Paz [BOT -04:00]</option>
<option value="America/Anguilla">Anguilla [AST -04:00]</option>
<option value="Atlantic/Stanley">Stanley [FKT -04:00]</option>
<option value="America/Detroit">Detroit [EDT -04:00]</option>
<option value="America/Boa_Vista">Boa Vista [AMT -04:00]</option>
<option value="America/Santiago">Santiago [CLT -04:00]</option>
<option value="America/Asuncion">Asuncion [PYT -04:00]</option>
<option value="Antarctica/Rothera">Rothera [ROTT -03:00]</option>
<option value="America/Paramaribo">Paramaribo [SRT -03:00]</option>
<option value="America/Sao_Paulo">Sao Paulo [BRT -03:00]</option>
<option value="America/Argentina/Buenos_Aires">Buenos Aires [ART -03:00]</option>
<option value="America/Cayenne">Cayenne [GFT -03:00]</option>
<option value="America/Glace_Bay">Glace Bay [ADT -03:00]</option>
<option value="America/Argentina/San_Luis">San Luis [WARST -03:00]</option>
<option value="America/Araguaina">Araguaina [BRT -03:00]</option>
<option value="America/Montevideo">Montevideo [UYT -03:00]</option>
<option value="America/St_Johns">St Johns [NDT -02:30]</option>
<option value="America/Miquelon">Miquelon [PMDT -02:00]</option>
<option value="America/Noronha">Noronha [FNT -02:00]</option>
<option value="America/Godthab">Godthab [WGST -02:00]</option>
<option value="Atlantic/Cape_Verde">Cape Verde [CVT -01:00]</option>
<option value="Atlantic/Azores">Azores [AZOST 00:00]</option>
<option value="America/Scoresbysund">Scoresbysund [EGST 00:00]</option>
<option value="UTC">UTC [UTC 00:00]</option>
<option value="Africa/Abidjan">Abidjan [GMT 00:00]</option>
<option value="Africa/Casablanca">Casablanca [WET 00:00]</option>
<option value="Africa/Bangui">Bangui [WAT +01:00]</option>
<option value="Europe/Guernsey">Guernsey [BST +01:00]</option>
<option value="Europe/Dublin">Dublin [IST +01:00]</option>
<option value="Africa/Algiers">Algiers [CET +01:00]</option>
<option value="Atlantic/Canary">Canary [WEST +01:00]</option>
<option value="Africa/Windhoek">Windhoek [WAT +01:00]</option>
<option value="Africa/Johannesburg">Johannesburg [SAST +02:00]</option>
<option value="Africa/Blantyre">Blantyre [CAT +02:00]</option>
<option value="Africa/Tripoli">Tripoli [EET +02:00]</option>
<option value="Africa/Ceuta">Ceuta [CEST +02:00]</option>
<option value="Asia/Jerusalem">Jerusalem [IDT +03:00]</option>
<option value="Africa/Addis_Ababa">Addis Ababa [EAT +03:00]</option>
<option value="Africa/Cairo">Cairo [EEST +03:00]</option>
<option value="Antarctica/Syowa">Syowa [SYOT +03:00]</option>
<option value="Europe/Volgograd">Volgograd [VOLST +04:00]</option>
<option value="Europe/Samara">Samara [SAMST +04:00]</option>
<option value="Asia/Tbilisi">Tbilisi [GET +04:00]</option>
<option value="Europe/Moscow">Moscow [MSD +04:00]</option>
<option value="Asia/Dubai">Dubai [GST +04:00]</option>
<option value="Indian/Mauritius">Mauritius [MUT +04:00]</option>
<option value="Indian/Reunion">Reunion [RET +04:00]</option>
<option value="Indian/Mahe">Mahe [SCT +04:00]</option>
<option value="Asia/Tehran">Tehran [IRDT +04:30]</option>
<option value="Asia/Kabul">Kabul [AFT +04:30]</option>
<option value="Asia/Aqtau">Aqtau [AQTT +05:00]</option>
<option value="Asia/Ashgabat">Ashgabat [TMT +05:00]</option>
<option value="Asia/Oral">Oral [ORAT +05:00]</option>
<option value="Asia/Yerevan">Yerevan [AMST +05:00]</option>
<option value="Asia/Baku">Baku [AZST +05:00]</option>
<option value="Indian/Kerguelen">Kerguelen [TFT +05:00]</option>
<option value="Indian/Maldives">Maldives [MVT +05:00]</option>
<option value="Asia/Karachi">Karachi [PKT +05:00]</option>
<option value="Asia/Dushanbe">Dushanbe [TJT +05:00]</option>
<option value="Asia/Samarkand">Samarkand [UZT +05:00]</option>
<option value="Antarctica/Mawson">Mawson [MAWT +05:00]</option>
<option value="Asia/Colombo">Colombo [IST +05:30]</option>
<option value="Asia/Kathmandu">Kathmandu [NPT +05:45]</option>
<option value="Indian/Chagos">Chagos [IOT +06:00]</option>
<option value="Asia/Bishkek">Bishkek [KGT +06:00]</option>
<option value="Asia/Almaty">Almaty [ALMT +06:00]</option>
<option value="Antarctica/Vostok">Vostok [VOST +06:00]</option>
<option value="Asia/Yekaterinburg">Yekaterinburg [YEKST +06:00]</option>
<option value="Asia/Dhaka">Dhaka [BDT +06:00]</option>
<option value="Asia/Thimphu">Thimphu [BTT +06:00]</option>
<option value="Asia/Qyzylorda">Qyzylorda [QYZT +06:00]</option>
<option value="Indian/Cocos">Cocos [CCT +06:30]</option>
<option value="Asia/Rangoon">Rangoon [MMT +06:30]</option>
<option value="Asia/Jakarta">Jakarta [WIT +07:00]</option>
<option value="Asia/Hovd">Hovd [HOVT +07:00]</option>
<option value="Antarctica/Davis">Davis [DAVT +07:00]</option>
<option value="Asia/Bangkok">Bangkok [ICT +07:00]</option>
<option value="Indian/Christmas">Christmas [CXT +07:00]</option>
<option value="Asia/Omsk">Omsk [OMSST +07:00]</option>
<option value="Asia/Novokuznetsk">Novokuznetsk [NOVST +07:00]</option>
<option value="Asia/Choibalsan">Choibalsan [CHOT +08:00]</option>
<option value="Asia/Ulaanbaatar">Ulaanbaatar [ULAT +08:00]</option>
<option value="Asia/Brunei">Brunei [BNT +08:00]</option>
<option value="Antarctica/Casey">Casey [WST +08:00]</option>
<option value="Asia/Singapore">Singapore [SGT +08:00]</option>
<option value="Asia/Manila">Manila [PHT +08:00]</option>
<option value="Asia/Hong_Kong">Hong Kong [HKT +08:00]</option>
<option value="Asia/Krasnoyarsk">Krasnoyarsk [KRAST +08:00]</option>
<option value="Asia/Makassar">Makassar [CIT +08:00]</option>
<option value="Asia/Kuala_Lumpur">Kuala Lumpur [MYT +08:00]</option>
<option value="Australia/Eucla">Eucla [CWST +08:45]</option>
<option value="Pacific/Palau">Palau [PWT +09:00]</option>
<option value="Asia/Tokyo">Tokyo [JST +09:00]</option>
<option value="Asia/Dili">Dili [TLT +09:00]</option>
<option value="Asia/Jayapura">Jayapura [EIT +09:00]</option>
<option value="Asia/Pyongyang">Pyongyang [KST +09:00]</option>
<option value="Asia/Irkutsk">Irkutsk [IRKST +09:00]</option>
<option value="Australia/Adelaide">Adelaide [CST +09:30]</option>
<option value="Asia/Yakutsk">Yakutsk [YAKST +10:00]</option>
<option value="Australia/Currie">Currie [EST +10:00]</option>
<option value="Pacific/Port_Moresby">Port Moresby [PGT +10:00]</option>
<option value="Pacific/Guam">Guam [ChST +10:00]</option>
<option value="Pacific/Truk">Truk [TRUT +10:00]</option>
<option value="Antarctica/DumontDUrville">DumontDUrville [DDUT +10:00]</option>
<option value="Australia/Lord_Howe">Lord Howe [LHST +10:30]</option>
<option value="Pacific/Ponape">Ponape [PONT +11:00]</option>
<option value="Pacific/Kosrae">Kosrae [KOST +11:00]</option>
<option value="Antarctica/Macquarie">Macquarie [MIST +11:00]</option>
<option value="Pacific/Noumea">Noumea [NCT +11:00]</option>
<option value="Pacific/Efate">Efate [VUT +11:00]</option>
<option value="Pacific/Guadalcanal">Guadalcanal [SBT +11:00]</option>
<option value="Asia/Sakhalin">Sakhalin [SAKST +11:00]</option>
<option value="Asia/Vladivostok">Vladivostok [VLAST +11:00]</option>
<option value="Pacific/Norfolk">Norfolk [NFT +11:30]</option>
<option value="Asia/Kamchatka">Kamchatka [PETST +12:00]</option>
<option value="Pacific/Tarawa">Tarawa [GILT +12:00]</option>
<option value="Asia/Magadan">Magadan [MAGST +12:00]</option>
<option value="Pacific/Wallis">Wallis [WFT +12:00]</option>
<option value="Pacific/Kwajalein">Kwajalein [MHT +12:00]</option>
<option value="Pacific/Funafuti">Funafuti [TVT +12:00]</option>
<option value="Pacific/Nauru">Nauru [NRT +12:00]</option>
<option value="Asia/Anadyr">Anadyr [ANAST +12:00]</option>
<option value="Antarctica/McMurdo">McMurdo [NZST +12:00]</option>
<option value="Pacific/Wake">Wake [WAKT +12:00]</option>
<option value="Pacific/Fiji">Fiji [FJT +12:00]</option>
<option value="Pacific/Chatham">Chatham [CHAST +12:45]</option>
<option value="Pacific/Enderbury">Enderbury [PHOT +13:00]</option>
<option value="Pacific/Tongatapu">Tongatapu [TOT +13:00]</option>
<option value="Pacific/Kiritimati">Kiritimati [LINT +14:00]</option>
</select>