date_set_timezone

Sets the base timezone to use for all the date and time functions.

Syntax:

date_set_timezone(timezone);


Argument Description
timezone The time zone to use for the base time.


Returns: N/A


Description

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):

Constant Description
timezone_local use the local time zone as set by the system
timezone_utc use Coordinated Universal Time


Example:

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

This code checks the base time zone setting for the game and if it is not UTC it then changes it.


Back: Date And Time
Next: date_get_timezone
© Copyright YoYo Games Ltd. 2019 All Rights Reserved