GameMaker has a great many functions and variables related to getting the date and time and calculating other values based off of them. By default these functions return the local time as set by the system, but you can use the following function to switch between local and UTC time:
The following built-in variables can be used to get specific date and time components:
The following functions can be used to get specific date and time components, as well as for creating new ones or for getting the span of days/hours between two given dates:
We also have two special time functions that give you a higher level of precision and control when running your game:
If you're looking for timing-related functions, see Time Sources.