date_set_timezone

设置用于所有日期和时间函数的系统时区。

语法:

date_set_timezone(timezone);


参数 描述
timezone The time zone to use for the base time.


返回: 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。


上一页: Date And Time
下一页: date_get_timezone
© Copyright YoYo Games Ltd. 2018 All Rights Reserved