Last active
March 5, 2016 18:52
-
-
Save Razzlegames/a3b5b54188d7994bccb6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends Spatial | |
func _ready(): | |
set_process(true) | |
pass | |
func _process(delta): | |
# Raw epoc time (in utc) | |
var time = OS.get_unix_time() | |
# Human readable dictionary in UTC with dict["hour"] | |
# dict["minute"] etc... see comment | |
var dict = OS.get_time_from_unix_time(time) | |
print(dict) | |
# dictionary contents will be formated as: | |
# (day:5), (hour:18), (minute:49), (month:2), (second:51), (weekday:6), (year:2016) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[Corrected]
Example output:
(day:5), (hour:18), (minute:49), (month:2), (second:51), (weekday:6), (year:2016)