Manual:Timezone/zh

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

主要方法

 * 在您的安装目录中创建一个的备份副本
 * 编辑LocalSettings.php文件并添加以下代码：


 * 将的值设置为适当的值（您可以在这里找到）. 参见下面的例子.

替代方法
此方法已经在首要方法无法使用的条件下被多位用户验证过.

具体替代方法
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 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 （另一个时区列表）