date_set_timezone(timezone);
参数 | 描述 |
---|---|
timezone | 基础时间所使用的时区。 |
返回: N/A(无返回值)
Sets the base time zone to use for all the rest of the date and
time functions. This time zone can either be local (as set
by the system) or UTC, and you would use one of the
following constants to define which is being used (by default this
is local time):
常量 | 描述 |
---|---|
timezone_local | 使用系统设置的本地时区 |
timezone_utc | 使用世界标准时(UTC) |
if date_get_timezone() != timezone_utc
{
date_set_timezone(timezone_utc);
}
此代码将会检查游戏的时区设置,如果不是UTC就将它改为UTC。