date_get_timezone

此函数获取所有其他日期和时间函数所使用的基本时区。该时区可以是本地(由系统设置)或UTC,函数将返回以下常量之一:

时区常数
常量描述
timezone_localuse the local time zone as set by the system
timezone_utcuse Coordinated Universal Time

 

语法:

date_get_timezone();

 

返回:

时区常数

 

例子:

if (date_get_timezone() != timezone_utc)
{
    date_set_timezone(timezone_utc);
}

此代码检查游戏的基准时区设置,如果它不是 UTC,然后更改它。