Make WordPress Core

Ticket #3962: tz-autocomplete-3.diff

File tz-autocomplete-3.diff, 39.6 KB (added by sambauers, 16 years ago)

Latest for trunk at [11238]

  • wp-includes/library.timezones.php

     
     1<?php
     2
     3$timezones = array(
     4        'Abu Dhabi - United Arab Emirates:UAE:U.A.E.' => array(
     5                'Asia/Dubai',
     6                __( 'Abu Dhabi - U.A.E.' )
     7        ),
     8        'Accra - Ghana' => array(
     9                'Africa/Accra',
     10                __( 'Accra - Ghana' )
     11        ),
     12        'Adak - United States of America:USA:U.S.A.' => array(
     13                'America/Adak',
     14                __( 'Adak - U.S.A.' )
     15        ),
     16        'Addis Ababa - Ethiopia' => array(
     17                'Africa/Addis_Ababa',
     18                __( 'Addis Ababa - Ethiopia' )
     19        ),
     20        'Adelaide - Australia' => array(
     21                'Australia/Adelaide',
     22                __( 'Adelaide - Australia' )
     23        ),
     24        'Algiers - Algeria' => array(
     25                'Africa/Algiers',
     26                __( 'Algiers - Algeria' )
     27        ),
     28        'Amman - Jordan' => array(
     29                'Asia/Amman',
     30                __( 'Amman - Jordan' )
     31        ),
     32        'Amsterdam - Netherlands' => array(
     33                'Europe/Amsterdam',
     34                __( 'Amsterdam - Netherlands' )
     35        ),
     36        'Anadyr - Russia' => array(
     37                'Asia/Anadyr',
     38                __( 'Anadyr - Russia' )
     39        ),
     40        'Antananarivo - Madagascar' => array(
     41                'Indian/Antananarivo',
     42                __( 'Antananarivo - Madagascar' )
     43        ),
     44        'Anchorage - United States of America:USA:U.S.A.' => array(
     45                'America/Anchorage',
     46                __( 'Anchorage - U.S.A.' )
     47        ),
     48        'Ankara - Turkey' => array(
     49                'Europe/Istanbul',
     50                __( 'Ankara - Turkey' )
     51        ),
     52        'Ashgabat - Turkmenistan' => array(
     53                'Asia/Ashgabat',
     54                __( 'Ashgabat - Turkmenistan' )
     55        ),
     56        'Asmera - Eritrea' => array(
     57                'Africa/Asmera',
     58                __( 'Asmera - Eritrea' )
     59        ),
     60        'Asuncion - Paraguay' => array(
     61                'America/Asuncion',
     62                __( 'Asunción - Paraguay' )
     63        ),
     64        'Athens - Greece' => array(
     65                'Europe/Athens',
     66                __( 'Athens - Greece' )
     67        ),
     68        'Atlanta - United States of America:USA:U.S.A.' => array(
     69                'America/New_York',
     70                __( 'Atlanta - U.S.A.' )
     71        ),
     72        'Austin - United States of America:USA:U.S.A.' => array(
     73                'America/Chicago',
     74                __( 'Austin - U.S.A.' )
     75        ),
     76        'Baghdad - Iraq' => array(
     77                'Asia/Baghdad',
     78                __( 'Baghdad - Iraq' )
     79        ),
     80        'Baku - Azerbaijan' => array(
     81                'Asia/Baku',
     82                __( 'Baku - Azerbaijan' )
     83        ),
     84        'Bamako - Mali' => array(
     85                'Africa/Bamako',
     86                __( 'Bamako - Mali' )
     87        ),
     88        'Bangkok - Thailand' => array(
     89                'Asia/Bangkok',
     90                __( 'Bangkok - Thailand' )
     91        ),
     92        'Bangui - Central African Republic' => array(
     93                'Africa/Bangui',
     94                __( 'Bangui - Central African Republic' )
     95        ),
     96        'Bridgetown - Barbados' => array(
     97                'America/Barbados',
     98                __( 'Bridgetown - Barbados' )
     99        ),
     100        'Beijing - China' => array(
     101                'Asia/Shanghai',
     102                __( 'Beijing - China' )
     103        ),
     104        'Beirut - Lebanon' => array(
     105                'Asia/Beirut',
     106                __( 'Beirut - Lebanon' )
     107        ),
     108        'Belgrade - Serbia and Montenegro' => array(
     109                'Europe/Belgrade',
     110                __( 'Belgrade - Serbia and Montenegro' )
     111        ),
     112        'Berlin - Germany' => array(
     113                'Europe/Berlin',
     114                __( 'Berlin - Germany' )
     115        ),
     116        'Blacksburg - United States of America:USA:U.S.A.' => array(
     117                'America/New_York',
     118                __( 'Blacksburg - U.S.A.' )
     119        ),
     120        'Bogota - Colombia' => array(
     121                'America/Bogota',
     122                __( 'Bogotá - Colombia' )
     123        ),
     124        'Boston - United States of America:USA:U.S.A.' => array(
     125                'America/New_York',
     126                __( 'Boston - U.S.A.' )
     127        ),
     128        'Bratislava - Slovakia' => array(
     129                'Europe/Bratislava',
     130                __( 'Bratislava - Slovakia' )
     131        ),
     132        'Brasalia - Brazil' => array(
     133                'America/Sao_Paulo',
     134                __( 'Brasília - Brazil' )
     135        ),
     136        'Brisbane - Australia' => array(
     137                'Australia/Brisbane',
     138                __( 'Brisbane - Australia' )
     139        ),
     140        'Brussels - Belgium' => array(
     141                'Europe/Brussels',
     142                __( 'Brussels - Belgium' )
     143        ),
     144        'Bucharest - Romania' => array(
     145                'Europe/Bucharest',
     146                __( 'Bucharest - Romania' )
     147        ),
     148        'Budapest - Hungary' => array(
     149                'Europe/Budapest',
     150                __( 'Budapest - Hungary' )
     151        ),
     152        'Buenos Aires - Argentina' => array(
     153                'America/Buenos_Aires',
     154                __( 'Buenos Aires - Argentina' )
     155        ),
     156        'Cairo - Egypt' => array(
     157                'Africa/Cairo',
     158                __( 'Cairo - Egypt' )
     159        ),
     160        'Calgary - Canada' => array(
     161                'America/Edmonton',
     162                __( 'Calgary - Canada' )
     163        ),
     164        'Canberra - Australia' => array(
     165                'Australia/Canberra',
     166                __( 'Canberra - Australia' )
     167        ),
     168        'Canton - China' => array(
     169                'Asia/Shanghai',
     170                __( 'Canton - China' )
     171        ),
     172        'Cape Town - South Africa' => array(
     173                'Africa/Johannesburg',
     174                __( 'Cape Town - South Africa' )
     175        ),
     176        'Caracas - Venezuela' => array(
     177                'America/Caracas',
     178                __( 'Caracas - Venezuela' )
     179        ),
     180        'Cardiff - Wales - United Kingdom:UK:U.K.' => array(
     181                'Europe/London',
     182                __( 'Cardiff - Wales - U.K.' )
     183        ),
     184        'Cayenne - French Guiana' => array(
     185                'America/Cayenne',
     186                __( 'Cayenne - French Guiana' )
     187        ),
     188        'Chennai - India' => array(
     189                'Asia/Calcutta',
     190                __( 'Chennai (Madras) - India' )
     191        ),
     192        'Chicago - United States of America:USA:U.S.A.' => array(
     193                'America/Chicago',
     194                __( 'Chicago - U.S.A.' )
     195        ),
     196        'Colombo - Sri Lanka' => array(
     197                'Asia/Colombo',
     198                __( 'Colombo - Sri Lanka' )
     199        ),
     200        'Columbus - United States of America:USA:U.S.A.' => array(
     201                'America/New_York',
     202                __( 'Columbus - U.S.A.' )
     203        ),
     204        'Conakry - Guinea' => array(
     205                'Africa/Conakry',
     206                __( 'Conakry - Guinea' )
     207        ),
     208        'Copenhagen - Denmark' => array(
     209                'Europe/Copenhagen',
     210                __( 'Copenhagen - Denmark' )
     211        ),
     212        'Cork - Ireland' => array(
     213                'Europe/Dublin',
     214                __( 'Cork - Ireland' )
     215        ),
     216        'Dhaka - Bangladesh' => array(
     217                'Asia/Dhaka',
     218                __( 'Dhaka - Bangladesh' )
     219        ),
     220        'Dakar - Senegal' => array(
     221                'Africa/Dakar',
     222                __( 'Dakar - Senegal' )
     223        ),
     224        'Dallas - United States of America:USA:U.S.A.' => array(
     225                'America/Chicago',
     226                __( 'Dallas - U.S.A.' )
     227        ),
     228        'Damascus - Syria' => array(
     229                'Asia/Damascus',
     230                __( 'Damascus - Syria' )
     231        ),
     232        'Dar es Salaam - Tanzania' => array(
     233                'Africa/Dar_es_Salaam',
     234                __( 'Dar es Salaam - Tanzania' )
     235        ),
     236        'Darwin - Australia' => array(
     237                'Australia/Darwin',
     238                __( 'Darwin - Australia' )
     239        ),
     240        'Denver - United States of America:USA:U.S.A.' => array(
     241                'America/Denver',
     242                __( 'Denver - U.S.A.' )
     243        ),
     244        'Detroit - United States of America:USA:U.S.A.' => array(
     245                'America/Detroit',
     246                __( 'Detroit - U.S.A.' )
     247        ),
     248        'Djibouti - Djibouti' => array(
     249                'Africa/Djibouti',
     250                __( 'Djibouti - Djibouti' )
     251        ),
     252        'Doha - Qatar' => array(
     253                'Asia/Qatar',
     254                __( 'Doha - Qatar' )
     255        ),
     256        'Douala - Cameroon' => array(
     257                'Africa/Douala',
     258                __( 'Douala - Cameroon' )
     259        ),
     260        'Dublin - Ireland' => array(
     261                'Europe/Dublin',
     262                __( 'Dublin - Ireland' )
     263        ),
     264        'Edinburgh - Scotland - United Kingdom:UK:U.K.' => array(
     265                'Europe/London',
     266                __( 'Edinburgh - Scotland - U.K.' )
     267        ),
     268        'Freetown - Sierra Leone' => array(
     269                'Africa/Freetown',
     270                __( 'Freetown - Sierra Leone' )
     271        ),
     272        'Geneva - Switzerland' => array(
     273                'Europe/Zurich',
     274                __( 'Geneva - Switzerland' )
     275        ),
     276        'Georgetown - Guyana' => array(
     277                'America/Guyana',
     278                __( 'Georgetown - Guyana' )
     279        ),
     280        'Grytviken - South Georgia' => array(
     281                'Atlantic/South_Georgia',
     282                __( 'Grytviken - South Georgia' )
     283        ),
     284        'Guam - United States of America:USA:U.S.A.' => array(
     285                'Pacific/Guam',
     286                __( 'Guam - U.S.A.' )
     287        ),
     288        'Guatemala - Guatemala' => array(
     289                'America/Guatemala',
     290                __( 'Guatemala - Guatemala' )
     291        ),
     292        'Halifax - Canada' => array(
     293                'America/Halifax',
     294                __( 'Halifax - Canada' )
     295        ),
     296        'Hamburg - Germany' => array(
     297                'Europe/Berlin',
     298                __( 'Hamburg - Germany' )
     299        ),
     300        'Hanoi - Vietnam' => array(
     301                'Asia/Saigon',
     302                __( 'Hanoi - Vietnam' )
     303        ),
     304        'Harare - Zimbabwe' => array(
     305                'Africa/Harare',
     306                __( 'Harare - Zimbabwe' )
     307        ),
     308        'Havana - Cuba' => array(
     309                'America/Havana',
     310                __( 'Havana - Cuba' )
     311        ),
     312        'Helsinki - Finland' => array(
     313                'Europe/Helsinki',
     314                __( 'Helsinki - Finland' )
     315        ),
     316        'Hobart - Australia' => array(
     317                'Australia/Hobart',
     318                __( 'Hobart - Australia' )
     319        ),
     320        'Hong Kong - China' => array(
     321                'Asia/Hong_Kong',
     322                __( 'Hong Kong - China' )
     323        ),
     324        'Honolulu - United States of America:USA:U.S.A.' => array(
     325                'Pacific/Honolulu',
     326                __( 'Honolulu - U.S.A.' )
     327        ),
     328        'Houston - United States of America:USA:U.S.A.' => array(
     329                'America/Chicago',
     330                __( 'Houston - U.S.A.' )
     331        ),
     332        'Indianapolis - United States of America:USA:U.S.A.' => array(
     333                'America/Indianapolis',
     334                __( 'Indianapolis - U.S.A.' )
     335        ),
     336        'Islamabad - Pakistan' => array(
     337                'Asia/Karachi',
     338                __( 'Islamabad - Pakistan' )
     339        ),
     340        'Istanbul - Turkey' => array(
     341                'Europe/Istanbul',
     342                __( 'Istanbul - Turkey' )
     343        ),
     344        'Jakarta - Indonesia' => array(
     345                'Asia/Jakarta',
     346                __( 'Jakarta - Indonesia' )
     347        ),
     348        'Jerusalem - Israel' => array(
     349                'Asia/Jerusalem',
     350                __( 'Jerusalem - Israel' )
     351        ),
     352        'Kabul - Afghanistan' => array(
     353                'Asia/Kabul',
     354                __( 'Kabul - Afghanistan' )
     355        ),
     356        'Kampala - Uganda' => array(
     357                'Africa/Kampala',
     358                __( 'Kampala - Uganda' )
     359        ),
     360        'Katmandu - Nepal' => array(
     361                'Asia/Katmandu',
     362                __( 'Katmandu - Nepal' )
     363        ),
     364        'Khartoum - Sudan' => array(
     365                'Africa/Khartoum',
     366                __( 'Khartoum - Sudan' )
     367        ),
     368        'Kiev - Ukraine' => array(
     369                'Europe/Kiev',
     370                __( 'Kiev - Ukraine' )
     371        ),
     372        'Kinshasa - Zaire' => array(
     373                'Africa/Kinshasa',
     374                __( 'Kinshasa - Zaire' )
     375        ),
     376        'Knoxville - United States of America:USA:U.S.A.' => array(
     377                'America/New_York',
     378                __( 'Knoxville - U.S.A.' )
     379        ),
     380        'Kolkata - India' => array(
     381                'Asia/Calcutta',
     382                __( 'Kolkata (Calcutta) - India' )
     383        ),
     384        'Krasnoyarsk - Russia' => array(
     385                'Asia/Krasnoyarsk',
     386                __( 'Krasnoyarsk - Russia' )
     387        ),
     388        'Kuala Lumpur - Malaysia' => array(
     389                'Asia/Kuala_Lumpur',
     390                __( 'Kuala Lumpur - Malaysia' )
     391        ),
     392        'Kuwait - Kuwait' => array(
     393                'Asia/Kuwait',
     394                __( 'Kuwait - Kuwait' )
     395        ),
     396        'La Paz - Bolivia' => array(
     397                'America/La_Paz',
     398                __( 'La Paz - Bolivia' )
     399        ),
     400        'Lagos - Nigeria' => array(
     401                'Africa/Lagos',
     402                __( 'Lagos - Nigeria' )
     403        ),
     404        'Lima - Peru' => array(
     405                'America/Lima',
     406                __( 'Lima - Peru' )
     407        ),
     408        'Lisbon - Portugal' => array(
     409                'Europe/Lisbon',
     410                __( 'Lisbon - Portugal' )
     411        ),
     412        'Ljubljana - Slovenia' => array(
     413                'Europe/Ljubljana',
     414                __( 'Ljubljana - Slovenia' )
     415        ),
     416        'London - England - United Kingdom:UK:U.K.' => array(
     417                'Europe/London',
     418                __( 'London - England - U.K.' )
     419        ),
     420        'Los Angeles - United States of America:USA:U.S.A.' => array(
     421                'America/Los_Angeles',
     422                __( 'Los Angeles - U.S.A.' )
     423        ),
     424        'Luanda - Angola' => array(
     425                'Africa/Luanda',
     426                __( 'Luanda - Angola' )
     427        ),
     428        'Lusaka - Zambia' => array(
     429                'Africa/Lusaka',
     430                __( 'Lusaka - Zambia' )
     431        ),
     432        'Madrid - Spain' => array(
     433                'Europe/Madrid',
     434                __( 'Madrid - Spain' )
     435        ),
     436        'Male - Maldives' => array(
     437                'Indian/Maldives',
     438                __( 'Male - Maldives' )
     439        ),
     440        'Managua - Nicaragua' => array(
     441                'America/Managua',
     442                __( 'Managua - Nicaragua' )
     443        ),
     444        'Manama - Bahrain' => array(
     445                'Asia/Bahrain',
     446                __( 'Manama - Bahrain' )
     447        ),
     448        'Manchester - United States of America:USA:U.S.A.' => array(
     449                'America/New_York',
     450                __( 'Manchester - U.S.A.' )
     451        ),
     452        'Manila - Philippines' => array(
     453                'Asia/Manila',
     454                __( 'Manila - Philippines' )
     455        ),
     456        'Maputo - Mozambique' => array(
     457                'Africa/Maputo',
     458                __( 'Maputo - Mozambique' )
     459        ),
     460        'Mecca - Saudia Arabia' => array(
     461                'Asia/Riyadh',
     462                __( 'Mecca - Saudia Arabia' )
     463        ),
     464        'Melbourne - Australia' => array(
     465                'Australia/Melbourne',
     466                __( 'Melbourne - Australia' )
     467        ),
     468        'Memphis - United States of America:USA:U.S.A.' => array(
     469                'America/Chicago',
     470                __( 'Memphis - U.S.A.' )
     471        ),
     472        'Mexico City - Mexico' => array(
     473                'America/Mexico_City',
     474                __( 'Mexico City - Mexico' )
     475        ),
     476        'Miami - United States of America:USA:U.S.A.' => array(
     477                'America/New_York',
     478                __( 'Miami - U.S.A.' )
     479        ),
     480        'Minneapolis - United States of America:USA:U.S.A.' => array(
     481                'America/Chicago',
     482                __( 'Minneapolis - U.S.A.' )
     483        ),
     484        'Magadan - Russia' => array(
     485                'Asia/Magadan',
     486                __( 'Magadan - Russia' )
     487        ),
     488        'Mogadisho - Somalia' => array(
     489                'Africa/Mogadishu',
     490                __( 'Mogadisho - Somalia' )
     491        ),
     492        'Monrovia - Liberia' => array(
     493                'Africa/Monrovia',
     494                __( 'Monrovia - Liberia' )
     495        ),
     496        'Montevideo - Uruguay' => array(
     497                'America/Montevideo',
     498                __( 'Montevideo - Uruguay' )
     499        ),
     500        'Montreal - Canada' => array(
     501                'America/Montreal',
     502                __( 'Montréal - Canada' )
     503        ),
     504        'Moscow - Russia' => array(
     505                'Europe/Moscow',
     506                __( 'Moscow - Russia' )
     507        ),
     508        'Mumbai - India' => array(
     509                'Asia/Calcutta',
     510                __( 'Mumbai (Bombay) - India' )
     511        ),
     512        'Munich - Germany' => array(
     513                'Europe/Berlin',
     514                __( 'Munich - Germany' )
     515        ),
     516        'Muscat - Oman' => array(
     517                'Asia/Muscat',
     518                __( 'Muscat - Oman' )
     519        ),
     520        'Nairobi - Kenya' => array(
     521                'Africa/Nairobi',
     522                __( 'Nairobi - Kenya' )
     523        ),
     524        'Ndjamena - Chad' => array(
     525                'Africa/Ndjamena',
     526                __( 'Ndjamena - Chad' )
     527        ),
     528        'New Delhi - India' => array(
     529                'Asia/Calcutta',
     530                __( 'New Delhi - India' )
     531        ),
     532        'New York - United States of America:USA:U.S.A.' => array(
     533                'America/New_York',
     534                __( 'New York - U.S.A.' )
     535        ),
     536        'Nouakchott - Mauritania' => array(
     537                'Africa/Nouakchott',
     538                __( 'Nouakchott - Mauritania' )
     539        ),
     540        'Noumea - New Caledonia' => array(
     541                'Pacific/Noumea',
     542                __( 'Nouméa - New Caledonia' )
     543        ),
     544        'Novosibirsk - Russia' => array(
     545                'Asia/Novosibirsk',
     546                __( 'Novosibirsk - Russia' )
     547        ),
     548        'Nuuk - Greenland' => array(
     549                'America/Godthab',
     550                __( 'Nuuk - Greenland' )
     551        ),
     552        'Omsk - Russia' => array(
     553                'Asia/Omsk',
     554                __( 'Omsk - Russia' )
     555        ),
     556        'Osaka - Japan' => array(
     557                'Asia/Tokyo',
     558                __( 'Osaka - Japan' )
     559        ),
     560        'Oslo - Norway' => array(
     561                'Europe/Oslo',
     562                __( 'Oslo - Norway' )
     563        ),
     564        'Ottawa - Canada' => array(
     565                'America/Toronto',
     566                __( 'Ottawa - Canada' )
     567        ),
     568        'Ougadougou - Burkina Faso' => array(
     569                'Africa/Ouagadougou',
     570                __( 'Ougadougou - Burkina Faso' )
     571        ),
     572        'Pago Pago - Samoa' => array(
     573                'Pacific/Pago_Pago',
     574                __( 'Pago Pago - Samoa' )
     575        ),
     576        'Panama - Panama' => array(
     577                'America/Panama',
     578                __( 'Panama - Panama' )
     579        ),
     580        'Paramaribo - Surinam' => array(
     581                'America/Paramaribo',
     582                __( 'Paramaribo - Surinam' )
     583        ),
     584        'Paris - France' => array(
     585                'Europe/Paris',
     586                __( 'Paris - France' )
     587        ),
     588        'Perth - Australia' => array(
     589                'Australia/Perth',
     590                __( 'Perth - Australia' )
     591        ),
     592        'Philadelphia - United States of America:USA:U.S.A.' => array(
     593                'America/New_York',
     594                __( 'Philadelphia - U.S.A.' )
     595        ),
     596        'Phnom Penh - Cambodia' => array(
     597                'Asia/Phnom_Penh',
     598                __( 'Phnom Penh - Cambodia' )
     599        ),
     600        'Phoenix - United States of America:USA:U.S.A.' => array(
     601                'America/Phoenix',
     602                __( 'Phoenix - U.S.A.' )
     603        ),
     604        'Ponta Delgada - Portugal' => array(
     605                'Atlantic/Azores',
     606                __( 'Ponta Delgada - Portugal' )
     607        ),
     608        'Port Louis - Mauritius' => array(
     609                'Indian/Mauritius',
     610                __( 'Port Louis - Mauritius' )
     611        ),
     612        'Port-au-Prince - Haiti' => array(
     613                'America/Port-au-Prince',
     614                __( 'Port-au-Prince - Haiti' )
     615        ),
     616        'Portland - United States of America:USA:U.S.A.' => array(
     617                'America/Los_Angeles',
     618                __( 'Portland - U.S.A.' )
     619        ),
     620        'Prague - Czech Republic' => array(
     621                'Europe/Prague',
     622                __( 'Prague - Czech Republic' )
     623        ),
     624        'Pyongyang - North Korea' => array(
     625                'Asia/Pyongyang',
     626                __( 'Pyongyang - North Korea' )
     627        ),
     628        'Quito - Ecuador' => array(
     629                'America/Guayaquil',
     630                __( 'Quito - Ecuador' )
     631        ),
     632        'Rabat - Morocco' => array(
     633                'Africa/Casablanca',
     634                __( 'Rabat - Morocco' )
     635        ),
     636        'Rangoon - Burma' => array(
     637                'Asia/Rangoon',
     638                __( 'Rangoon - Burma' )
     639        ),
     640        'Recife - Brazil' => array(
     641                'America/Recife',
     642                __( 'Recife - Brazil' )
     643        ),
     644        'Regina - Canada' => array(
     645                'America/Regina',
     646                __( 'Regina - Canada' )
     647        ),
     648        'Reykjavik - Iceland' => array(
     649                'Atlantic/Reykjavik',
     650                __( 'Reykjavík - Iceland' )
     651        ),
     652        'Rio de Janeiro - Brazil' => array(
     653                'America/Sao_Paulo',
     654                __( 'Rio de Janeiro - Brazil' )
     655        ),
     656        'Riyadh - Saudia Arabia' => array(
     657                'Asia/Riyadh',
     658                __( 'Riyadh - Saudia Arabia' )
     659        ),
     660        'Rome - Italy' => array(
     661                'Europe/Rome',
     662                __( 'Rome - Italy' )
     663        ),
     664        'Salt Lake City - United States of America:USA:U.S.A.' => array(
     665                'America/Denver',
     666                __( 'Salt Lake City - U.S.A.' )
     667        ),
     668        'San Diego - United States of America:USA:U.S.A.' => array(
     669                'America/Los_Angeles',
     670                __( 'San Diego - U.S.A.' )
     671        ),
     672        'San Francisco - United States of America:USA:U.S.A.' => array(
     673                'America/Los_Angeles',
     674                __( 'San Francisco - U.S.A.' )
     675        ),
     676        'San Jose - Costa Rica' => array(
     677                'America/Costa_Rica',
     678                __( 'San José - Costa Rica' )
     679        ),
     680        'San Juan - Puerto Rico' => array(
     681                'America/Puerto_Rico',
     682                __( 'San Juan - Puerto Rico' )
     683        ),
     684        'San Salvador - El Salvador' => array(
     685                'America/El_Salvador',
     686                __( 'San Salvador - El Salvador' )
     687        ),
     688        'Sanaa - Yemen' => array(
     689                'Asia/Aden',
     690                __( 'Sanaa - Yemen' )
     691        ),
     692        'Santiago - Chile' => array(
     693                'America/Santiago',
     694                __( 'Santiago - Chile' )
     695        ),
     696        'Santo Domingo - Dominican Republic' => array(
     697                'America/Santo_Domingo',
     698                __( 'Santo Domingo - Dominican Republic' )
     699        ),
     700        'Sao Paulo - Brazil' => array(
     701                'America/Sao_Paulo',
     702                __( 'São Paulo - Brazil' )
     703        ),
     704        'Seattle - United States of America:USA:U.S.A.' => array(
     705                'America/Los_Angeles',
     706                __( 'Seattle - U.S.A.' )
     707        ),
     708        'Seoul - Korea' => array(
     709                'Asia/Seoul',
     710                __( 'Seoul - Korea' )
     711        ),
     712        'Shanghai - China' => array(
     713                'Asia/Shanghai',
     714                __( 'Shanghai - China' )
     715        ),
     716        'Singapore - Singapore' => array(
     717                'Asia/Singapore',
     718                __( 'Singapore - Singapore' )
     719        ),
     720        'Sofia - Bulgaria' => array(
     721                'Europe/Sofia',
     722                __( 'Sofia - Bulgaria' )
     723        ),
     724        'St. John\'s - Canada' => array(
     725                'America/St_Johns',
     726                __( 'St. John\'s - Canada' )
     727        ),
     728        'St. Louis - United States of America:USA:U.S.A.' => array(
     729                'America/Chicago',
     730                __( 'St. Louis - U.S.A.' )
     731        ),
     732        'St. Petersburg - Russia' => array(
     733                'Europe/Moscow',
     734                __( 'St. Petersburg - Russia' )
     735        ),
     736        'Stockholm - Sweden' => array(
     737                'Europe/Stockholm',
     738                __( 'Stockholm - Sweden' )
     739        ),
     740        'Sydney - Australia' => array(
     741                'Australia/Sydney',
     742                __( 'Sydney - Australia' )
     743        ),
     744        'Taipei - ' => array(
     745                'Asia/Taipei',
     746                __( 'Taipei - ' )
     747        ),
     748        'Tashkent - Uzbekistan' => array(
     749                'Asia/Tashkent',
     750                __( 'Tashkent - Uzbekistan' )
     751        ),
     752        'Tegucigalpa - Honduras' => array(
     753                'America/Tegucigalpa',
     754                __( 'Tegucigalpa - Honduras' )
     755        ),
     756        'Tehran - Iran' => array(
     757                'Asia/Tehran',
     758                __( 'Tehran - Iran' )
     759        ),
     760        'Thanh Pho Ho Chi Minh - Vietnam' => array(
     761                'Asia/Saigon',
     762                __( 'Thanh Pho Ho Chi Minh - Vietnam' )
     763        ),
     764        'Tientsin - China' => array(
     765                'Asia/Shanghai',
     766                __( 'Tientsin - China' )
     767        ),
     768        'Tokyo - Japan' => array(
     769                'Asia/Tokyo',
     770                __( 'Tokyo - Japan' )
     771        ),
     772        'Toronto - Canada' => array(
     773                'America/Toronto',
     774                __( 'Toronto - Canada' )
     775        ),
     776        'Tripoli - Libya' => array(
     777                'Africa/Tripoli',
     778                __( 'Tripoli - Libya' )
     779        ),
     780        'Tunis - Tunisia' => array(
     781                'Africa/Tunis',
     782                __( 'Tunis - Tunisia' )
     783        ),
     784        'Ulaanbaatar - Mongolia' => array(
     785                'Asia/Ulaanbaatar',
     786                __( 'Ulaanbaatar - Mongolia' )
     787        ),
     788        'UTC' => array(
     789                'UTC',
     790                __( 'UTC' )
     791        ),
     792        'Vancouver - Canada' => array(
     793                'America/Vancouver',
     794                __( 'Vancouver - Canada' )
     795        ),
     796        'Victoria - Seychelles' => array(
     797                'Indian/Mahe',
     798                __( 'Victoria - Seychelles' )
     799        ),
     800        'Vienna - Austria' => array(
     801                'Europe/Vienna',
     802                __( 'Vienna - Austria' )
     803        ),
     804        'Vladivostok - Russia' => array(
     805                'Asia/Vladivostok',
     806                __( 'Vladivostok - Russia' )
     807        ),
     808        'Volgograd - Russia' => array(
     809                'Europe/Moscow',
     810                __( 'Volgograd - Russia' )
     811        ),
     812        'Warsaw - Poland' => array(
     813                'Europe/Warsaw',
     814                __( 'Warsaw - Poland' )
     815        ),
     816        'Washington, D.C. - United States of America:USA:U.S.A.' => array(
     817                'America/New_York',
     818                __( 'Washington, D.C. - U.S.A.' )
     819        ),
     820        'Wellington - New Zealand' => array(
     821                'Pacific/Auckland',
     822                __( 'Wellington - New Zealand' )
     823        ),
     824        'Winnipeg - Canada' => array(
     825                'America/Winnipeg',
     826                __( 'Winnipeg - Canada' )
     827        ),
     828        'Yakutsk - Russia' => array(
     829                'Asia/Yakutsk',
     830                __( 'Yakutsk - Russia' )
     831        ),
     832        'Yekaterinburg - Russia' => array(
     833                'Asia/Yekaterinburg',
     834                __( 'Yekaterinburg - Russia' )
     835        ),
     836        'Yerevan - Armenia' => array(
     837                'Asia/Yerevan',
     838                __( 'Yerevan - Armenia' )
     839        ),
     840        'Zagreb - Croatia' => array(
     841                'Europe/Zagreb',
     842                __( 'Zagreb - Croatia' )
     843        ),
     844        'Zurich - Switzerland' => array(
     845                'Europe/Zurich',
     846                __( 'Zurich - Switzerland' )
     847        )
     848);
  • wp-includes/js/jquery/suggest.js

     
    1 (function(a){a.suggest=function(o,g){var c,f,n,d,q,p;c=a(o).attr("autocomplete","off");f=a(document.createElement("ul"));n=false;d=0;q=[];p=0;f.addClass(g.resultsClass).appendTo("body");j();a(window).load(j).resize(j);c.blur(function(){setTimeout(function(){f.hide()},200)});if(a.browser.msie){try{f.bgiframe()}catch(s){}}if(a.browser.mozilla){c.keypress(m)}else{c.keydown(m)}function j(){var e=c.offset();f.css({top:(e.top+o.offsetHeight)+"px",left:e.left+"px"})}function m(w){if((/27$|38$|40$/.test(w.keyCode)&&f.is(":visible"))||(/^13$|^9$/.test(w.keyCode)&&u())){if(w.preventDefault){w.preventDefault()}if(w.stopPropagation){w.stopPropagation()}w.cancelBubble=true;w.returnValue=false;switch(w.keyCode){case 38:k();break;case 40:t();break;case 9:case 13:r();break;case 27:f.hide();break}}else{if(c.val().length!=d){if(n){clearTimeout(n)}n=setTimeout(l,g.delay);d=c.val().length}}}function l(){var x=a.trim(c.val()),w,e;if(g.multiple){w=x.lastIndexOf(g.multipleSep);if(w!=-1){x=x.substr(w+g.multipleSep.length)}}if(x.length>=g.minchars){cached=v(x);if(cached){i(cached.items)}else{a.get(g.source,{q:x},function(y){f.hide();e=b(y,x);i(e);h(x,e,y.length)})}}else{f.hide()}}function v(w){var e;for(e=0;e<q.length;e++){if(q[e]["q"]==w){q.unshift(q.splice(e,1)[0]);return q[0]}}return false}function h(y,e,w){var x;while(q.length&&(p+w>g.maxCacheSize)){x=q.pop();p-=x.size}q.push({q:y,size:w,items:e});p+=w}function i(e){var x="",w;if(!e){return}if(!e.length){f.hide();return}j();for(w=0;w<e.length;w++){x+="<li>"+e[w]+"</li>"}f.html(x).show();f.children("li").mouseover(function(){f.children("li").removeClass(g.selectClass);a(this).addClass(g.selectClass)}).click(function(y){y.preventDefault();y.stopPropagation();r()})}function b(e,z){var w=[],A=e.split(g.delimiter),y,x;for(y=0;y<A.length;y++){x=a.trim(A[y]);if(x){x=x.replace(new RegExp(z,"ig"),function(B){return'<span class="'+g.matchClass+'">'+B+"</span>"});w[w.length]=x}}return w}function u(){var e;if(!f.is(":visible")){return false}e=f.children("li."+g.selectClass);if(!e.length){e=false}return e}function r(){$currentResult=u();if($currentResult){if(g.multiple){if(c.val().indexOf(g.multipleSep)!=-1){$currentVal=c.val().substr(0,(c.val().lastIndexOf(g.multipleSep)+g.multipleSep.length))}else{$currentVal=""}c.val($currentVal+$currentResult.text()+g.multipleSep);c.focus()}else{c.val($currentResult.text())}f.hide();if(g.onSelect){g.onSelect.apply(c[0])}}}function t(){$currentResult=u();if($currentResult){$currentResult.removeClass(g.selectClass).next().addClass(g.selectClass)}else{f.children("li:first-child").addClass(g.selectClass)}}function k(){var e=u();if(e){e.removeClass(g.selectClass).prev().addClass(g.selectClass)}else{f.children("li:last-child").addClass(g.selectClass)}}};a.fn.suggest=function(c,b){if(!c){return}b=b||{};b.multiple=b.multiple||false;b.multipleSep=b.multipleSep||", ";b.source=c;b.delay=b.delay||100;b.resultsClass=b.resultsClass||"ac_results";b.selectClass=b.selectClass||"ac_over";b.matchClass=b.matchClass||"ac_match";b.minchars=b.minchars||2;b.delimiter=b.delimiter||"\n";b.onSelect=b.onSelect||false;b.maxCacheSize=b.maxCacheSize||65536;this.each(function(){new a.suggest(this,b)});return this}})(jQuery);
    2  No newline at end of file
     1(function(a){a.suggest=function(o,g){var c,f,n,d,q,p;c=a(o).attr("autocomplete","off");f=a(document.createElement("ul"));n=false;d=0;q=[];p=0;f.addClass(g.resultsClass).appendTo("body");j();a(window).load(j).resize(j);c.blur(function(){setTimeout(function(){f.hide()},200)});if(a.browser.msie){try{f.bgiframe()}catch(s){}}if(a.browser.mozilla){c.keypress(m)}else{c.keydown(m)}function j(){var e=c.offset();f.css({top:(e.top+o.offsetHeight)+"px",left:e.left+"px"})}function m(w){if((/27$|38$|40$/.test(w.keyCode)&&f.is(":visible"))||(/^13$|^9$/.test(w.keyCode)&&u())){if(w.preventDefault){w.preventDefault()}if(w.stopPropagation){w.stopPropagation()}w.cancelBubble=true;w.returnValue=false;switch(w.keyCode){case 38:k();break;case 40:t();break;case 9:case 13:r();break;case 27:f.hide();break}}else{if(c.val().length!=d){if(n){clearTimeout(n)}n=setTimeout(l,g.delay);d=c.val().length}}}function l(){var x=a.trim(c.val()),w,e;if(g.multiple){w=x.lastIndexOf(g.multipleSep);if(w!=-1){x=x.substr(w+g.multipleSep.length)}}if(x.length>=g.minchars){cached=v(x);if(cached){i(cached.items)}else{a.get(g.source,{q:x},function(y){f.hide();e=b(y,x);i(e);h(x,e,y.length)})}}else{f.hide()}}function v(w){var e;for(e=0;e<q.length;e++){if(q[e]["q"]==w){q.unshift(q.splice(e,1)[0]);return q[0]}}return false}function h(y,e,w){var x;while(q.length&&(p+w>g.maxCacheSize)){x=q.pop();p-=x.size}q.push({q:y,size:w,items:e});p+=w}function i(e){var x="",w;if(!e){return}if(!e.length){f.hide();return}j();for(w=0;w<e.length;w++){x+="<li>"+e[w]+"</li>"}f.html(x).show();f.children("li").mouseover(function(){f.children("li").removeClass(g.selectClass);a(this).addClass(g.selectClass)}).click(function(y){y.preventDefault();y.stopPropagation();r()})}function b(e,z){var w=[],A=e.split(g.delimiter),y,x;for(y=0;y<A.length;y++){x=a.trim(A[y]);if(x){var z=x.split('|||');if (z.length==2) {var h='<span style="display:none;">'+z[0]+'|</span>';x=z[1]}else{var h='';x=z[0]}x=x.replace(new RegExp(z,"ig"),function(B){return'<span class="'+g.matchClass+'">'+B+"</span>"});w[w.length]=h+x}}return w}function u(){var e;if(!f.is(":visible")){return false}e=f.children("li."+g.selectClass);if(!e.length){e=false}return e}function r(){$currentResult=u();if($currentResult){if(g.multiple){if(c.val().indexOf(g.multipleSep)!=-1){$currentVal=c.val().substr(0,(c.val().lastIndexOf(g.multipleSep)+g.multipleSep.length))}else{$currentVal=""}c.val($currentVal+$currentResult.text()+g.multipleSep);c.focus()}else{c.val($currentResult.text())}f.hide();if(g.onSelect){g.onSelect.apply(c[0])}}}function t(){$currentResult=u();if($currentResult){$currentResult.removeClass(g.selectClass).next().addClass(g.selectClass)}else{f.children("li:first-child").addClass(g.selectClass)}}function k(){var e=u();if(e){e.removeClass(g.selectClass).prev().addClass(g.selectClass)}else{f.children("li:last-child").addClass(g.selectClass)}}};a.fn.suggest=function(c,b){if(!c){return}b=b||{};b.multiple=b.multiple||false;b.multipleSep=b.multipleSep||", ";b.source=c;b.delay=b.delay||100;b.resultsClass=b.resultsClass||"ac_results";b.selectClass=b.selectClass||"ac_over";b.matchClass=b.matchClass||"ac_match";b.minchars=b.minchars||2;b.delimiter=b.delimiter||"\n";b.onSelect=b.onSelect||false;b.maxCacheSize=b.maxCacheSize||65536;this.each(function(){new a.suggest(this,b)});return this}})(jQuery);
     2 No newline at end of file
  • wp-includes/js/jquery/suggest.dev.js

     
    223223                        for (i = 0; i < tokens.length; i++) {
    224224                                token = $.trim(tokens[i]);
    225225                                if (token) {
     226                                        var parts = token.split('|||');
     227                                        if (parts.length == 2) {
     228                                                var hidden = '<span style="display:none;">' + parts[0] + '|</span>';
     229                                                token = parts[1];
     230                                        } else {
     231                                                var hidden = '';
     232                                                token = parts[0];
     233                                        }
    226234                                        token = token.replace(
    227235                                                new RegExp(q, 'ig'),
    228236                                                function(q) { return '<span class="' + options.matchClass + '">' + q + '</span>' }
    229237                                                );
    230                                         items[items.length] = token;
     238                                        items[items.length] = hidden + token;
    231239                                }
    232240                        }
    233241
  • wp-includes/functions.php

     
    30623062function wp_timezone_override_offset() {
    30633063        if (!wp_timezone_supported()) return false;
    30643064
    3065         $tz = get_option('timezone_string');
     3065        $tz = wp_get_zoneinfo_from_string( get_option('timezone_string') );
    30663066        if (empty($tz)) return false;
    30673067
    30683068        @date_default_timezone_set($tz);
     
    30923092        return false;
    30933093}
    30943094
     3095function wp_get_zoneinfo_from_string( $timezone_string ) {
     3096        if ( @timezone_open( $timezone_string ) ) {
     3097                return $timezone_string;
     3098        }
     3099       
     3100        global $timezones;
     3101        if ( !isset( $timezones ) ) {
     3102                require( ABSPATH . WPINC . '/library.timezones.php' );
     3103        }
     3104       
     3105        if ( !isset( $timezones[$timezone_string] ) ) {
     3106                return '';
     3107        }
     3108       
     3109        if ( !isset( $timezones[$timezone_string][0] ) ) {
     3110                return '';
     3111        }
     3112       
     3113        if ( !@timezone_open( $timezones[$timezone_string][0] ) ) {
     3114                return '';
     3115        }
     3116       
     3117        return $timezones[$timezone_string][0];
     3118}
     3119
    30953120/**
    30963121 * Gives a nicely formatted list of timezone strings // temporary! Not in final
    30973122 *
    3098  * @param string $selectedzone - which zone should be the selected one
     3123 * @param string $timezone_string - which zone should be the selected one
    30993124 *
    31003125 */
    3101 function wp_timezone_choice($selectedzone) {
    3102         $continents = array('Africa', 'America', 'Antarctica', 'Arctic', 'Asia', 'Atlantic', 'Australia', 'Europe', 'Indian', 'Pacific', 'Etc');
    3103 
    3104         $all = timezone_identifiers_list();
    3105 
    3106         $i = 0;
    3107         foreach ( $all as $zone ) {
    3108                 $zone = explode('/',$zone);
    3109                 if ( ! in_array($zone[0], $continents) )
    3110                         continue;
    3111                 $zonen[$i]['continent'] = isset($zone[0]) ? $zone[0] : '';
    3112                 $zonen[$i]['city'] = isset($zone[1]) ? $zone[1] : '';
    3113                 $zonen[$i]['subcity'] = isset($zone[2]) ? $zone[2] : '';
    3114                 $i++;
     3126function wp_timezone_choice( $timezone_string = false ) {
     3127        $gmt_offset = get_option('gmt_offset');
     3128       
     3129        if ( !$timezone_string ) {
     3130                $timezone_string = get_option('timezone_string');
    31153131        }
    3116 
    3117         asort($zonen);
    3118         $structure = '';
    3119         $pad = '&nbsp;&nbsp;&nbsp;';
    3120 
    3121         if ( empty($selectedzone) )
    3122                 $structure .= '<option selected="selected" value="">' . __('Select a city') . "</option>\n";
    3123         foreach ( $zonen as $zone ) {
    3124                 extract($zone);
    3125                 if ( empty($selectcontinent) && !empty($city) ) {
    3126                         $selectcontinent = $continent;
    3127                         $structure .= '<optgroup label="'.$continent.'">' . "\n"; // continent
    3128                 } elseif ( !empty($selectcontinent) && $selectcontinent != $continent ) {
    3129                         $structure .= "</optgroup>\n";
    3130                         $selectcontinent = '';
    3131                         if ( !empty($city) ) {
    3132                                 $selectcontinent = $continent;
    3133                                 $structure .= '<optgroup label="'.$continent.'">' . "\n"; // continent
    3134                         }
    3135                 }
    3136 
    3137                 if ( !empty($city) ) {
    3138                         if ( !empty($subcity) ) {
    3139                                 $city = $city . '/'. $subcity;
    3140                         }
    3141                         $structure .= "\t<option ".((($continent.'/'.$city)==$selectedzone)?'selected="selected"':'')." value=\"".($continent.'/'.$city)."\">$pad".str_replace('_',' ',$city)."</option>\n"; //Timezone
     3132       
     3133        if ( !wp_get_zoneinfo_from_string($timezone_string) ) {
     3134                $timezone_string = false;
     3135        }
     3136       
     3137        if ( !$timezone_string ) {
     3138                $timezone_string = $gmt_offset;
     3139        }
     3140       
     3141        if ( preg_match( '/^\-*[0-9\.]+$/', $timezone_string ) ) {
     3142                // It's an old UTC offset from pre-2.8
     3143                if ( preg_match( '/^\-*0$/', $timezone_string ) ) {
     3144                        $timezone_string = 'UTC';
     3145                        $timezone_display = 'UTC';
    31423146                } else {
    3143                         $structure .= "<option ".(($continent==$selectedzone)?'selected="selected"':'')." value=\"".$continent."\">".$continent."</option>\n"; //Timezone
     3147                        $timezone_display = (string) number_format( (float) $timezone_string, 2, '.', '' );
     3148                        $timezone_display = str_replace(
     3149                                array( '.00', '.25', '.50', '.75' ),
     3150                                array( ':00', ':15', ':30', ':45' ),
     3151                                $timezone_display
     3152                        );
     3153                        $timezone_display = preg_replace( '/^([0-9:]+)$/', '+$1', $timezone_display );
     3154                        $timezone_display = 'UTC ' . $timezone_display;
     3155                        $gmt_offset = $timezone_string;
     3156                        $timezone_string = '';
    31443157                }
     3158        } elseif ( strpos( $timezone_string, '/' ) !== false ) {
     3159                // It's a ZoneInfo zone
     3160                $timezone_display = $timezone_string;
     3161        } else {
     3162                // It's a named city from the library
     3163                global $timezones;
     3164                if ( !isset( $timezones ) ) {
     3165                        require( ABSPATH . WPINC . '/library.timezones.php' );
     3166                }
     3167                $timezone_display = $timezones[$timezone_string][1];
    31453168        }
    3146 
    3147         if ( !empty($selectcontinent) )
    3148                 $structure .= "</optgroup>\n";
    3149         return $structure;
     3169       
     3170        $r = '<input type="hidden" id="gmt_offset" name="gmt_offset" value="' . attribute_escape( $gmt_offset ) . '" />' . "\n";
     3171        $r .= '<input type="hidden" id="timezone_string" name="timezone_string" value="' . attribute_escape( $timezone_string ) . '" />' . "\n";
     3172        $r .= '<input id="timezone_display" name="timezone_display" class="regular-text" value="' . attribute_escape( $timezone_display ) . '" />' . "\n";
     3173       
     3174        return $r;
    31503175}
    31513176
    31523177
  • wp-admin/admin-ajax.php

     
    111111
    112112        die('0');
    113113        break;
     114case 'get-timezones' :
     115        $q = strtolower( $_GET['q'] );
     116        if ( !$q ) die('0');
     117
     118        if ( strpos( $q, '/' ) === false ) {
     119                require( ABSPATH . WPINC . '/library.timezones.php' );
     120                foreach ( $timezones as $key => $timezone ) {
     121                        if ( strpos( strtolower( $key ), $q ) !== false ) {
     122                                echo $key . '|||' . $timezone[1] . "\n";
     123                        }
     124                }
     125        } elseif ( function_exists( 'timezone_identifiers_list' ) ) {
     126                $timezones = timezone_identifiers_list();
     127                foreach ( $timezones as $timezone ) {
     128                        if ( strpos( $timezone, '/' ) === false ) {
     129                                continue;
     130                        }
     131                        list( $continent, $city ) = explode( '/', $timezone, 2 );
     132                        if ( !in_array( $continent, array( 'Africa', 'America', 'Antarctica', 'Arctic', 'Asia', 'Atlantic', 'Australia', 'Europe', 'Indian', 'Pacific' ) ) ) {
     133                                continue;
     134                        }
     135                        if ( strpos( strtolower( $timezone ), $q ) !== false ) {
     136                                echo $timezone . '|||' . $timezone . "\n";
     137                        }
     138                }
     139        }
     140
     141        die;
     142        break;
    114143default :
    115144        do_action( 'wp_ajax_' . $_GET['action'] );
    116145        die('0');
  • wp-admin/wp-admin.css

     
    15861586}
    15871587
    15881588.ac_results li {
     1589        margin: 1px;
    15891590        padding: 2px 5px;
    15901591        white-space: nowrap;
    15911592        text-align: left;
    15921593}
    15931594
     1595.ac_results.timezone_results {
     1596        min-width: 331px;
     1597}
     1598
    15941599.ac_over {
    15951600        cursor: pointer;
    15961601}
     
    29892994        font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif;
    29902995}
    29912996
     2997#time-info {
     2998        -moz-border-radius: 4px;
     2999        -khtml-border-radius: 4px;
     3000        -webkit-border-radius: 4px;
     3001        border-radius: 4px;
     3002        background-color: rgb(223, 223, 223);
     3003        float: right;
     3004        color: rgb(102, 102, 102);
     3005        margin: 0 0 10px 10px;
     3006}
     3007
     3008#time-info legend {
     3009        line-height: 1.2em;
     3010        padding: 4px 6px;
     3011        margin: 0;
     3012        font-weight: bold;
     3013}
     3014
     3015#time-info th {
     3016        line-height: 1.2em;
     3017        padding: 0 2px 4px 6px;
     3018        margin: 0;
     3019        text-align: right;
     3020        width: auto;
     3021        text-shadow: none;
     3022        color: rgb(102, 102, 102);
     3023}
     3024
     3025#time-info td {
     3026        line-height: 1.2em;
     3027        padding: 0 6px 4px 0;
     3028        margin: 0;
     3029        font-style: italic;
     3030}
     3031
     3032#time-description {
     3033        display: block;
     3034}
     3035
    29923036ul#dismissed-updates {
    29933037        display: none;
    29943038}
  • wp-admin/options-general.php

     
    4747}
    4848add_filter('admin_head', 'add_js');
    4949
     50wp_enqueue_script('suggest');
     51
    5052include('./admin-header.php');
    5153?>
    5254
     
    129131<?php if ($current_offset) : ?>
    130132        <span id="local-time"><?php printf(__('UTC %1$s is <code>%2$s</code>'), $current_offset_name, date_i18n($time_format)); ?></span>
    131133<?php endif; ?>
    132 <br />
    133 <span class="description"><?php _e('Unfortunately, you have to manually update this for Daylight Savings Time. Lame, we know, but will be fixed in the future.'); ?></span>
     134<br/>
     135<span class="setting-description"><?php _e('Unfortunately, you have to manually update this for Daylight Savings Time.'); ?></span>
    134136</td>
    135137<?php
    136138else: // looks like we can do nice timezone selection!
    137 $current_offset = get_option('gmt_offset');
    138 $tzstring = get_option('timezone_string');
    139 if (empty($tzstring)) { // set the Etc zone if no timezone string exists
    140         if ($current_offset < 0) $offnum = - ceil($current_offset);
    141         else $offnum = - floor($current_offset);
    142         $tzstring = 'Etc/GMT' . (($offnum >= 0) ? '+' : '') . $offnum;
    143 }
    144139?>
    145 <th scope="row"><label for="timezone_string"><?php _e('Timezone') ?></label></th>
     140<th scope="row"><label for="timezone_string"><?php _e('Time zone') ?></label></th>
    146141<td>
    147142
    148 <select id="timezone_string" name="timezone_string">
    149 <?php echo wp_timezone_choice($tzstring); ?>
    150 </select>
    151 
    152     <span id="utc-time"><?php printf(__('<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>'), date_i18n($timezone_format, false, 'gmt')); ?></span>
    153 <?php if (get_option('timezone_string')) : ?>
    154         <span id="local-time"><?php printf(__('Local time is <code>%1$s</code>'), date_i18n($timezone_format)); ?></span>
     143        <div id="time-info">
     144        <table>
     145                <legend>Current time settings</legend>
     146                <tr>
     147                        <th><?php _e( '<abbr title="Coordinated Universal Time">UTC</abbr> time:' ); ?></th>
     148                        <td><?php echo date_i18n( $timezone_format, false, 'gmt' ); ?></td>
     149                </tr>
     150<?php if ( get_option( 'timezone_string' ) ) : ?>
     151                <tr>
     152                        <th><?php _e( 'Local time:' ); ?></th>
     153                        <td><?php echo date_i18n( $timezone_format ); ?></td>
     154                </tr>
    155155<?php endif; ?>
    156 <br />
    157 <span class="description"><?php _e('Choose a city in the same timezone as you.'); ?></span>
    158 <br />
    159 <span>
    160 <?php if (get_option('timezone_string')) : ?>
    161         <?php
    162         $now = localtime(time(),true);
    163         if ($now['tm_isdst']) _e('This timezone is currently in daylight savings time.');
    164         else _e('This timezone is currently in standard time.');
    165         ?>
    166         <br />
    167         <?php
    168         if (function_exists('timezone_transitions_get') && $tzstring) {
    169                 $dateTimeZoneSelected = new DateTimeZone($tzstring);
     156<?php if ( $tzstring = wp_get_zoneinfo_from_string( get_option( 'timezone_string' ) ) ) : ?>
     157                <tr>
     158                        <th><?php _e( '"Zoneinfo" zone:' ); ?></th>
     159                        <td><?php echo $tzstring; ?></td>
     160                </tr>
     161                <tr>
     162                        <th><?php _e( 'Currently observing:' ) ?></th>
     163                        <td><?php
     164        $now = localtime( time(),true );
     165        if ( $now['tm_isdst'] )
     166                _e( 'daylight savings time' );
     167        else
     168                _e( 'standard time' );
     169?></td>
     170                </tr>
     171<?php
     172        if ( function_exists( 'timezone_transitions_get' ) ) {
     173                $dateTimeZoneSelected = new DateTimeZone( $tzstring );
    170174                foreach (timezone_transitions_get($dateTimeZoneSelected) as $tr) {
    171175                        if ($tr['ts'] > time()) {
    172176                                $found = true;
     
    175179                }
    176180
    177181                if ( isset($found) && $found === true ) {
    178                         echo ' ';
    179                         $message = $tr['isdst'] ?
    180                                 __('Daylight savings time begins on: <code>%s</code>.') :
    181                                 __('Standard time begins  on: <code>%s</code>.');
    182                         $tz = new DateTimeZone($tzstring);
    183                         $d = new DateTime( "@{$tr['ts']}" );
    184                         $d->setTimezone($tz);
    185                         printf( $message, date_i18n(get_option('date_format').' '.get_option('time_format'), $d->format('U') ) );
    186                 } else {
    187                         _e('This timezone does not observe daylight savings time.');
     182                        $term = $tr['isdst'] ?
     183                                __('Daylight savings begins:') :
     184                                __('Standard time resumes:');
     185                        $definition = date_i18n( $timezone_format, $tr['ts'] );
     186?>
     187                <tr>
     188                        <th><?php echo $term; ?></th>
     189                        <td><?php echo $definition; ?></td>
     190                </tr>
     191<?php
    188192                }
    189193        }
    190         ?>
    191         </span>
     194?>
    192195<?php endif; ?>
     196        </table>
     197        </div>
     198
     199<?php echo wp_timezone_choice(); ?>
     200
     201        <script type="text/javascript" charset="utf-8">
     202                jQuery(function() {
     203                        jQuery('#timezone_display').bind('change', function() {
     204                                jQuery('#timezone_string').attr('value', this.value);
     205                        } );
     206                        jQuery('#timezone_display').suggest('admin-ajax.php?action=get-timezones',{
     207                                minchars: 2,
     208                                resultsClass: 'ac_results timezone_results',
     209                                delay: 100,
     210                                onSelect: function() {
     211                                        var splitString = this.value.split('|');
     212                                        var timezoneString = splitString[0];
     213                                        var timezoneDisplay = splitString[1];
     214                                        this.value = timezoneDisplay;
     215                                        jQuery('#timezone_string').attr('value', timezoneString);
     216                                }
     217                        } );
     218                } );
     219        </script>
     220
     221        <span id="time-description" class="description"><?php _e('Enter your country or a nearby major city and select the appropriate time zone from the drop-down list. If you can\'t locate a relevant time zone, you may manually enter a <a href="http://en.wikipedia.org/wiki/List_of_zoneinfo_time_zones">"zoneinfo" time zone</a> instead.'); ?></span>
    193222</td>
    194223
    195224<?php endif; ?>