current_hour

Returns the hour corresponding to the current moment.

Syntax:

current_hour;


Returns: Real


Description

This read only variable will return the hour that corresponds to the current moment based on the default time zone for the system (ie: local time). You can change the base time zone to use with the function date_set_timezone().


Example:

draw_text(32, 32, "The time is " + string(current_hour) + ":" + string(current_minute) + "." + string(current_second));

The above code would draw the current international time on the screen.


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