1
|
<?php
|
2
|
|
3
|
/**
|
4
|
* @file
|
5
|
* Administrative page callbacks for the date_api module.
|
6
|
*/
|
7
|
|
8
|
/**
|
9
|
* Create replacement values for deprecated timezone names.
|
10
|
*/
|
11
|
function _date_timezone_replacement($old) {
|
12
|
$replace = array(
|
13
|
'Brazil/Acre' => 'America/Rio_Branco',
|
14
|
'Brazil/DeNoronha' => 'America/Noronha',
|
15
|
'Brazil/East' => 'America/Recife',
|
16
|
'Brazil/West' => 'America/Manaus',
|
17
|
'Canada/Atlantic' => 'America/Halifax',
|
18
|
'Canada/Central' => 'America/Winnipeg',
|
19
|
'Canada/East-Saskatchewan' => 'America/Regina',
|
20
|
'Canada/Eastern' => 'America/Toronto',
|
21
|
'Canada/Mountain' => 'America/Edmonton',
|
22
|
'Canada/Newfoundland' => 'America/St_Johns',
|
23
|
'Canada/Pacific' => 'America/Vancouver',
|
24
|
'Canada/Saskatchewan' => 'America/Regina',
|
25
|
'Canada/Yukon' => 'America/Whitehorse',
|
26
|
'CET' => 'Europe/Berlin',
|
27
|
'Chile/Continental' => 'America/Santiago',
|
28
|
'Chile/EasterIsland' => 'Pacific/Easter',
|
29
|
'CST6CDT' => 'America/Chicago',
|
30
|
'Cuba' => 'America/Havana',
|
31
|
'EET' => 'Europe/Bucharest',
|
32
|
'Egypt' => 'Africa/Cairo',
|
33
|
'Eire' => 'Europe/Belfast',
|
34
|
'EST' => 'America/New_York',
|
35
|
'EST5EDT' => 'America/New_York',
|
36
|
'GB' => 'Europe/London',
|
37
|
'GB-Eire' => 'Europe/Belfast',
|
38
|
'Etc/GMT' => 'UTC',
|
39
|
'Etc/GMT+0' => 'UTC',
|
40
|
'Etc/GMT+1' => 'UTC',
|
41
|
'Etc/GMT+10' => 'UTC',
|
42
|
'Etc/GMT+11' => 'UTC',
|
43
|
'Etc/GMT+12' => 'UTC',
|
44
|
'Etc/GMT+2' => 'UTC',
|
45
|
'Etc/GMT+3' => 'UTC',
|
46
|
'Etc/GMT+4' => 'UTC',
|
47
|
'Etc/GMT+5' => 'UTC',
|
48
|
'Etc/GMT+6' => 'UTC',
|
49
|
'Etc/GMT+7' => 'UTC',
|
50
|
'Etc/GMT+8' => 'UTC',
|
51
|
'Etc/GMT+9' => 'UTC',
|
52
|
'Etc/GMT-0' => 'UTC',
|
53
|
'Etc/GMT-1' => 'UTC',
|
54
|
'Etc/GMT-10' => 'UTC',
|
55
|
'Etc/GMT-11' => 'UTC',
|
56
|
'Etc/GMT-12' => 'UTC',
|
57
|
'Etc/GMT-13' => 'UTC',
|
58
|
'Etc/GMT-14' => 'UTC',
|
59
|
'Etc/GMT-2' => 'UTC',
|
60
|
'Etc/GMT-3' => 'UTC',
|
61
|
'Etc/GMT-4' => 'UTC',
|
62
|
'Etc/GMT-5' => 'UTC',
|
63
|
'Etc/GMT-6' => 'UTC',
|
64
|
'Etc/GMT-7' => 'UTC',
|
65
|
'Etc/GMT-8' => 'UTC',
|
66
|
'Etc/GMT-9' => 'UTC',
|
67
|
'Etc/GMT0' => 'UTC',
|
68
|
'Etc/Greenwich' => 'UTC',
|
69
|
'Etc/UCT' => 'UTC',
|
70
|
'Etc/Universal' => 'UTC',
|
71
|
'Etc/UTC' => 'UTC',
|
72
|
'Etc/Zulu' => 'UTC',
|
73
|
'Factory' => 'UTC',
|
74
|
'GMT' => 'UTC',
|
75
|
'GMT+0' => 'UTC',
|
76
|
'GMT-0' => 'UTC',
|
77
|
'GMT0' => 'UTC',
|
78
|
'Hongkong' => 'Asia/Hong_Kong',
|
79
|
'HST' => 'Pacific/Honolulu',
|
80
|
'Iceland' => 'Atlantic/Reykjavik',
|
81
|
'Iran' => 'Asia/Tehran',
|
82
|
'Israel' => 'Asia/Tel_Aviv',
|
83
|
'Jamaica' => 'America/Jamaica',
|
84
|
'Japan' => 'Asia/Tokyo',
|
85
|
'Kwajalein' => 'Pacific/Kwajalein',
|
86
|
'Libya' => 'Africa/Tunis',
|
87
|
'MET' => 'Europe/Budapest',
|
88
|
'Mexico/BajaNorte' => 'America/Tijuana',
|
89
|
'Mexico/BajaSur' => 'America/Mazatlan',
|
90
|
'Mexico/General' => 'America/Mexico_City',
|
91
|
'MST' => 'America/Boise',
|
92
|
'MST7MDT' => 'America/Boise',
|
93
|
'Navajo' => 'America/Phoenix',
|
94
|
'NZ' => 'Pacific/Auckland',
|
95
|
'NZ-CHAT' => 'Pacific/Chatham',
|
96
|
'Poland' => 'Europe/Warsaw',
|
97
|
'Portugal' => 'Europe/Lisbon',
|
98
|
'PRC' => 'Asia/Chongqing',
|
99
|
'PST8PDT' => 'America/Los_Angeles',
|
100
|
'ROC' => 'Asia/Taipei',
|
101
|
'ROK' => 'Asia/Seoul',
|
102
|
'Singapore' => 'Asia/Singapore',
|
103
|
'Turkey' => 'Europe/Istanbul',
|
104
|
'US/Alaska' => 'America/Anchorage',
|
105
|
'US/Aleutian' => 'America/Adak',
|
106
|
'US/Arizona' => 'America/Phoenix',
|
107
|
'US/Central' => 'America/Chicago',
|
108
|
'US/East-Indiana' => 'America/Indianapolis',
|
109
|
'US/Eastern' => 'America/New_York',
|
110
|
'US/Hawaii' => 'Pacific/Honolulu',
|
111
|
'US/Indiana-Starke' => 'America/Indiana/Knox',
|
112
|
'US/Michigan' => 'America/Detroit',
|
113
|
'US/Mountain' => 'America/Boise',
|
114
|
'US/Pacific' => 'America/Los_Angeles',
|
115
|
'US/Pacific-New' => 'America/Los_Angeles',
|
116
|
'US/Samoa' => 'Pacific/Samoa',
|
117
|
'W-SU' => 'Europe/Moscow',
|
118
|
'WET' => 'Europe/Paris',
|
119
|
);
|
120
|
if (array_key_exists($old, $replace)) {
|
121
|
return $replace[$old];
|
122
|
}
|
123
|
else {
|
124
|
return $old;
|
125
|
}
|
126
|
}
|