equal
deleted
inserted
replaced
137 </td> |
137 </td> |
138 <?php |
138 <?php |
139 else: // looks like we can do nice timezone selection! |
139 else: // looks like we can do nice timezone selection! |
140 $current_offset = get_option('gmt_offset'); |
140 $current_offset = get_option('gmt_offset'); |
141 $tzstring = get_option('timezone_string'); |
141 $tzstring = get_option('timezone_string'); |
|
142 |
|
143 $check_zone_info = true; |
|
144 |
|
145 // Remove old Etc mappings. Fallback to gmt_offset. |
|
146 if ( false !== strpos($tzstring,'Etc/GMT') ) |
|
147 $tzstring = ''; |
|
148 |
142 if (empty($tzstring)) { // set the Etc zone if no timezone string exists |
149 if (empty($tzstring)) { // set the Etc zone if no timezone string exists |
143 if ($current_offset < 0) $offnum = - ceil($current_offset); |
150 $check_zone_info = false; |
144 else $offnum = - floor($current_offset); |
151 if ( 0 == $current_offset ) |
145 $tzstring = 'Etc/GMT' . (($offnum >= 0) ? '+' : '') . $offnum; |
152 $tzstring = 'UTC+0'; |
|
153 elseif ($current_offset < 0) |
|
154 $tzstring = 'UTC' . $current_offset; |
|
155 else |
|
156 $tzstring = 'UTC+' . $current_offset; |
146 } |
157 } |
|
158 |
147 ?> |
159 ?> |
148 <th scope="row"><label for="timezone_string"><?php _e('Timezone') ?></label></th> |
160 <th scope="row"><label for="timezone_string"><?php _e('Timezone') ?></label></th> |
149 <td> |
161 <td> |
150 |
162 |
151 <select id="timezone_string" name="timezone_string"> |
163 <select id="timezone_string" name="timezone_string"> |
158 <?php endif; ?> |
170 <?php endif; ?> |
159 <br /> |
171 <br /> |
160 <span class="description"><?php _e('Choose a city in the same timezone as you.'); ?></span> |
172 <span class="description"><?php _e('Choose a city in the same timezone as you.'); ?></span> |
161 <br /> |
173 <br /> |
162 <span> |
174 <span> |
163 <?php if ($tzstring) : ?> |
175 <?php if ($check_zone_info && $tzstring) : ?> |
164 <?php |
176 <?php |
165 $now = localtime(time(),true); |
177 $now = localtime(time(),true); |
166 if ($now['tm_isdst']) _e('This timezone is currently in daylight savings time.'); |
178 if ($now['tm_isdst']) _e('This timezone is currently in daylight savings time.'); |
167 else _e('This timezone is currently in standard time.'); |
179 else _e('This timezone is currently in standard time.'); |
168 ?> |
180 ?> |