Index: trunk/phase3/includes/Preferences.php |
— | — | @@ -1180,9 +1180,16 @@ |
1181 | 1181 | static function getTimezoneOptions() { |
1182 | 1182 | $opt = array(); |
1183 | 1183 | |
1184 | | - global $wgLocalTZoffset; |
1185 | | - |
1186 | | - $opt[wfMsg( 'timezoneuseserverdefault' )] = "System|$wgLocalTZoffset"; |
| 1184 | + global $wgLocalTZoffset, $wgLocaltimezone; |
| 1185 | + // Check that $wgLocalTZoffset is the same as $wgLocaltimezone |
| 1186 | + if ( $wgLocalTZoffset == date('Z') / 60 ) { |
| 1187 | + $server_tz_msg = wfMsg( 'timezoneuseserverdefault', $wgLocaltimezone ); |
| 1188 | + } |
| 1189 | + else { |
| 1190 | + $tzstring = sprintf( '%+03d:%02d', floor( $wgLocalTZoffset / 60 ), abs( $wgLocalTZoffset ) % 60 ); |
| 1191 | + $server_tz_msg = wfMsg( 'timezoneuseserverdefault', $tzstring ); |
| 1192 | + } |
| 1193 | + $opt[$server_tz_msg] = "System|$wgLocalTZoffset"; |
1187 | 1194 | $opt[wfMsg( 'timezoneuseoffset' )] = 'other'; |
1188 | 1195 | $opt[wfMsg( 'guesstimezone' )] = 'guess'; |
1189 | 1196 | |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1791,7 +1791,7 @@ |
1792 | 1792 | 'savedprefs' => 'Your preferences have been saved.', |
1793 | 1793 | 'timezonelegend' => 'Time zone:', |
1794 | 1794 | 'localtime' => 'Local time:', |
1795 | | -'timezoneuseserverdefault' => 'Use server default', |
| 1795 | +'timezoneuseserverdefault' => 'Use wiki default ($1)', |
1796 | 1796 | 'timezoneuseoffset' => 'Other (specify offset)', |
1797 | 1797 | 'timezoneoffset' => 'Offset¹:', |
1798 | 1798 | 'servertime' => 'Server time:', |