forked from leonardoxc/leonardoxc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FN_timezones.php
217 lines (199 loc) · 5.46 KB
/
FN_timezones.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<?
//************************************************************************
// Leonardo XC Server, https://github.com/leonardoxc/leonardoxc
//
// Copyright (c) 2004-2010 by Andreadakis Manolis
//
// This program is free software. You can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License.
//
// $Id: FN_timezones.php,v 1.6 2012/10/04 05:59:26 manolis Exp $
//
//************************************************************************
function getTZforCountry($countryCode) {
global $Countries2timeZones;
return $Countries2timeZones[$countryCode];
}
//special cases
/*
Portugal
Azores UTC-1 UTC From the last Sunday in March at 00:00 to the last Sunday in October at 01:00 Atlantic/Azores
Madeira UTC UTC+1 From the last Sunday in March at 01:00 to the last Sunday in October at 02:00 Atlantic/Madeira
Continental Portugal UTC UTC+1 From the last Sunday in March at 01:00 to the last Sunday in October at 02:00 Europe/Lisbon
Simple Rule if lon < -20 ( - is W ) then TZ=Atlantic/Azores
Spain
Spain, except Canary Islands UTC+1 UTC+2 From the last Sunday in March at 03:00 to the last Sunday in October at 02:00
Canary Islands UTC UTC+1 From the last Sunday in March at 01:00 to the last Sunday in October at 02:00
Canary Islands Atlantic/Canary
Ceuta and Melilla Africa/Ceuta
Spain (all other places) Europe/Madrid
Simple Rule if lon < -11 (- is W ) then TZ=Atlantic/Canary
new zeland
http://www.statoids.com/tnz.html -> WILL USE Pacific/Auckland for all !!
Canada
http://www.statoids.com/tca.html
Brazil
http://www.statoids.com/tbr.html
australia
http://www.statoids.com/tau.html
central - west is on 129E
central - east is on
lat > 141E for lon < -26 (S)
lat > 138E for lon > -26 (S)
east - > Australia/Sydney
west
central
equador
http://www.statoids.com/tec.html
argentina
http://www.statoids.com/tar.html
chile
http://www.statoids.com/tcl.html
mexico
http://www.statoids.com/tmx.html
*/
global $Countries2timeZones;
$Countries2timeZones=array(
// AFRICA
'AO'=>'Africa/Luanda',
'BF'=>'Africa/Ouagadougou',
'BI'=>'Africa/Bujumbura',
'BJ'=>'Africa/Porto-Novo',
'BW'=>'Africa/Gaborone',
'CF'=>'Africa/Bangui',
'CG'=>'Africa/Brazzaville',
'CI'=>'Africa/Abidjan',
'CM'=>'Africa/Douala',
'DJ'=>'Africa/Djibouti',
'DZ'=>'Africa/Algiers',
'EG'=>'Africa/Cairo',
'EH'=>'Africa/El_Aaiun',
'ER'=>'Africa/Asmera',
'ES'=>'Africa/Ceuta',
'ET'=>'Africa/Addis_Ababa',
'GA'=>'Africa/Libreville',
'GH'=>'Africa/Accra',
'GM'=>'Africa/Banjul',
'GN'=>'Africa/Conakry',
'GQ'=>'Africa/Malabo',
'GW'=>'Africa/Bissau',
'KE'=>'Africa/Nairobi',
'LR'=>'Africa/Monrovia',
'LS'=>'Africa/Maseru',
'LY'=>'Africa/Tripoli',
'MA'=>'Africa/Casablanca',
'ML'=>'Africa/Bamako',
'MR'=>'Africa/Nouakchott',
'MW'=>'Africa/Blantyre',
'MZ'=>'Africa/Maputo',
'NA'=>'Africa/Windhoek',
'NE'=>'Africa/Niamey',
'NG'=>'Africa/Lagos',
'RW'=>'Africa/Kigali',
'SD'=>'Africa/Khartoum',
'SL'=>'Africa/Freetown',
'SN'=>'Africa/Dakar',
'SO'=>'Africa/Mogadishu',
'ST'=>'Africa/Sao_Tome',
'SZ'=>'Africa/Mbabane',
'TD'=>'Africa/Ndjamena',
'TG'=>'Africa/Lome',
'TN'=>'Africa/Tunis',
'TZ'=>'Africa/Dar_es_Salaam',
'UG'=>'Africa/Kampala',
'ZA'=>'Africa/Johannesburg',
'ZM'=>'Africa/Lusaka',
'ZW'=>'Africa/Harare',
// AMERICA
'AG'=>'America/Antigua',
'AI'=>'America/Anguilla',
'AN'=>'America/Curacao',
'AW'=>'America/Aruba',
'BB'=>'America/Barbados',
'BO'=>'America/La_Paz',
'BS'=>'America/Nassau',
'BZ'=>'America/Belize',
'CL'=>'America/Santiago',
'CO'=>'America/Bogota',
'CR'=>'America/Costa_Rica',
'CU'=>'America/Havana',
'DM'=>'America/Dominica',
'DO'=>'America/Santo_Domingo',
'EC'=>'America/Guayaquil',
'GD'=>'America/Grenada',
'GF'=>'America/Cayenne',
'GP'=>'America/Guadeloupe',
'GT'=>'America/Guatemala',
'GY'=>'America/Guyana',
'HN'=>'America/Tegucigalpa',
'HT'=>'America/Port-au-Prince',
'JM'=>'America/Jamaica',
'KN'=>'America/St_Kitts',
'KY'=>'America/Cayman',
'LC'=>'America/St_Lucia',
'MQ'=>'America/Martinique',
'MS'=>'America/Montserrat',
'NI'=>'America/Managua',
'PA'=>'America/Panama',
'PE'=>'America/Lima',
'PM'=>'America/Miquelon',
'PR'=>'America/Puerto_Rico',
'PY'=>'America/Asuncion',
'SR'=>'America/Paramaribo',
'SV'=>'America/El_Salvador',
'TC'=>'America/Grand_Turk',
'TT'=>'America/Port_of_Spain',
'UY'=>'America/Montevideo',
'VC'=>'America/St_Vincent',
'VE'=>'America/Caracas',
'VG'=>'America/Tortola',
'VI'=>'America/St_Thomas',
// EUROPE
'AD'=>'Europe/Andorra',
'AL'=>'Europe/Tirane',
'AT'=>'Europe/Vienna',
'AX'=>'Europe/Mariehamn',
'BA'=>'Europe/Sarajevo',
'BE'=>'Europe/Brussels',
'BG'=>'Europe/Sofia',
'BY'=>'Europe/Minsk',
'CH'=>'Europe/Zurich',
'CS'=>'Europe/Belgrade',
'CZ'=>'Europe/Prague',
'DE'=>'Europe/Berlin',
'DK'=>'Europe/Copenhagen',
'EE'=>'Europe/Tallinn',
'ES'=>'Europe/Madrid',
'FI'=>'Europe/Helsinki',
'FR'=>'Europe/Paris',
'GB'=>'Europe/London',
'GI'=>'Europe/Gibraltar',
'GR'=>'Europe/Athens',
'HR'=>'Europe/Zagreb',
'HU'=>'Europe/Budapest',
'IE'=>'Europe/Dublin',
'IT'=>'Europe/Rome',
'LI'=>'Europe/Vaduz',
'LT'=>'Europe/Vilnius',
'LU'=>'Europe/Luxembourg',
'LV'=>'Europe/Riga',
'MC'=>'Europe/Monaco',
'MD'=>'Europe/Chisinau',
'MK'=>'Europe/Skopje',
'MT'=>'Europe/Malta',
'NL'=>'Europe/Amsterdam',
'NO'=>'Europe/Oslo',
'PL'=>'Europe/Warsaw',
'PT'=>'Europe/Lisbon',
'RO'=>'Europe/Bucharest',
'SE'=>'Europe/Stockholm',
'SI'=>'Europe/Ljubljana',
'SK'=>'Europe/Bratislava',
'SM'=>'Europe/San_Marino',
'TR'=>'Europe/Istanbul',
'VA'=>'Europe/Vatican',
// Asia / pacific
'NZ'=>'Pacific/Auckland',
);
?>