Manual:Timezone/zh

未指定自定义偏移的用户的默认时区（tz）可被手动配置.

主要方法

 * Create a backup copy of the file found in your install directory
 * Edit LocalSettings.php and add the following code:


 * Set the value to the proper value which you can find here. 参见下面的例子.

此时区将被用于：
 * ~ 签名
 * 最近更改中的时间戳
 * 历史中的时间戳

Adding this code to the LocalSettings.php conflicts with the RSS Feed dates in. See the Discussion page of Extension:RSS for more information

替代方法
This method has been confirmed by multiple users in situations where the primary method has not worked.

具体替代方法
If you just want to use the local time of your PC, you can add this line in your LocalSettings.php. This method is what MediaWiki does by default (see includes/Setup.php); it also avoids problems with daylight savings time:

未确认方法

 * To use your local time zone (say NZDT) put this in LocalSettings.php


 * This example may also work


 * In this case the primary method did not take daylight savings time into account. The example below works:


 * To make it work in 1.5.8, specify the offset in hours, so change all occurrences of '/ 60' to '/ 3600', for example.

Combine it with the tip above to make daylight savings work.


 * This line is needed in 1.16. It applies to both anonymous and logged in users. Note that you will need to provide the correct values if you want the zone to be selected by default in the timezone dropdown:

The methods in this section are unconfirmed and may not work properly.

手动时区规格
The primary method needs the server to support the ' ' database; some non-GNU hosts don't do that. However you can supply timezone data manually - unfortunately, only "GMT0" seems to work on Windows.

例如使用


 * 而不是


 * 或


 * 而不是

更多详情请参见


 * 系统配置：时区 （时区列表）
 * Specifying the Time Zone with TZ (general format)
 * timezones.conf.xml （另一个时区列表）