Split Unixtime into components
localtime(timestamp, local=0, year, month, day, hour, minute, second, weekday, yearday)
Split the timestamp into components.
timestamp | Unix timestamp (seconds since 1970-01-01, UTC) |
local | false=result is UTC, true=result is local time |
year | Will be set to the year |
month | Will be set to the month |
day | Will be set to day of month |
hour | Will be set to the hour |
minute | Will be set to the minute |
second | Will be set to the second |
weekday | Will be set to the day of week (0=Sunday) |
yearday | Will be set to the day in the year |
Returns the timestamp. The parameters year – yearday are written as described above.
new yy, mo, dd, hh, mi, ss; new t = GetSystemItem(SYSITEM_EPOCH); localtime( t, false, yy, mo, dd, hh, mi, ss ); // yy, mo, dd, hh, mi and ss are set to current UTC time.
NOTE: First appeared in firmware 22110901