Skip to content

Commit a8a822e

Browse files
author
Jim Hu
committed
add timezones to prefs
1 parent fb1fa4e commit a8a822e

File tree

4 files changed

+55
-2
lines changed

4 files changed

+55
-2
lines changed

config.inc.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
/* ** Timezones **
3131
If timezone is not set, all events show in the local time of the source calendar. This isn't a problem if all your calendars are in the same timezone. If you set a timezone for the server, events in other timezones are shown when they occur at the server's time.
3232
*/
33-
# 'timezone' => 'US/Central',
33+
'timezone' => 'US/Central',
3434
# 'second_offset' => $secs,
3535

3636
/* ** Appearance **

default_config.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
class Configs{
33
private static $instance;
44
private function __construct(){
5-
$this->phpicalendar_version = '2.3rc1.3';
5+
$this->phpicalendar_version = '2.3rc1.4';
66
// Configuration file for PHP iCalendar 2.25rc1
77
//
88
// To set values, change the text between the single quotes

functions/timezones.php

+1
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@
381381
$tz_array['Europe/Zaporozhye'] = array('+0200', '+0300');
382382
$tz_array['Europe/Zurich'] = array('+0100', '+0200');
383383
$tz_array['GB'] = array('+0000', '+0100');
384+
$tz_array['GMT'] = array('+0000', '+0000');
384385
$tz_array['GB-Eire'] = array('+0000', '+0100');
385386
$tz_array['HST'] = array('-1000', '-1000');
386387
$tz_array['Hongkong'] = array('+0800', '+0800');

preferences.php

+52
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,58 @@
144144
$i++;
145145
}
146146

147+
$timezone_subset = array(
148+
'',
149+
'GMT',
150+
'US/Hawaii',
151+
'US/Pacific',
152+
'US/Mountain',
153+
'US/Central',
154+
'US/Eastern',
155+
'Canada/Newfoundland',
156+
'CET',
157+
'EET',
158+
'Etc/GMT-1',
159+
'Etc/GMT-2',
160+
'Etc/GMT-3',
161+
'Etc/GMT-4',
162+
'Etc/GMT-5',
163+
'Etc/GMT-6',
164+
'Etc/GMT-7',
165+
'Etc/GMT-8',
166+
'Etc/GMT-9',
167+
'Etc/GMT-10',
168+
'Etc/GMT-11',
169+
'Etc/GMT-12',
170+
'Etc/GMT-13',
171+
'Etc/GMT-14',
172+
'Etc/GMT+1',
173+
'Etc/GMT+2',
174+
'Etc/GMT+3',
175+
'Etc/GMT+4',
176+
'Etc/GMT+5',
177+
'Etc/GMT+6',
178+
'Etc/GMT+7',
179+
'Etc/GMT+8',
180+
'Etc/GMT+9',
181+
'Etc/GMT+10',
182+
'Etc/GMT+11',
183+
'Etc/GMT+12',
184+
'MET',
185+
'Mexico/General',
186+
'NZ',
187+
'WET'
188+
);
189+
$timezone_select = '';
190+
foreach ($timezone_subset as $i => $timezone) {
191+
if ($timezone_subset[$i] == $cookie_timezone) {
192+
$timezone_select .= "<option value='$timezone' selected='selected'>$timezone</option>\n";
193+
} else {
194+
$timezone_select .= "<option value='$timezone.'>$timezone</option>\n";
195+
}
196+
}
197+
198+
147199
$dir_handle = @opendir(BASE.'templates/');
148200
$style_select = '';
149201
while ($file = readdir($dir_handle)) {

0 commit comments

Comments
 (0)