current_hour

Returns the hour corresponding to the current moment.

Syntax:

GML Code Example

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:

GML Code 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.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here