makeTime()
Returns a time or alert time in the internal time format.
Synopsis
time makeTime(unsigned year, unsigned month, unsigned day[, unsigned hour[, unsigned minute[, unsigned second[, unsigned milli[, bool daylightsaving]]]]]);
atime makeTime(unsigned year, unsigned month, unsigned day[, unsigned hour[, unsigned minute[, unsigned second[, unsigned milli[, bool daylightsaving]]]]]);
Parameters
Parameter | Meaning |
year | year |
month | month |
day | day |
hour | hour |
minute | minute |
second | second |
milli | millisecond |
daylightsaving | summer or winter time |
Return value
internal time format
Description
The function makeTime() returns the time specified in the argument in the internal time format time. makeTime() functions as setTime() but without the time being written to an argument variable.
String conversions into time, for example, DebugN("Exp. date: "+makeTime(2007,12,31,0,0)); do not work and do not produce an error.
Please consider that the stated and split time is represented as local time (not UTC) whereas the resulting variable value for time/atime are afterwards represented as UTC-Time and therefor the seconds since 1.1.1970.
Example
The following example creates a field from three times and outputs it.
main() { dyn_time d; time t1,t2,t3; t1 = makeTime(1999,8,18,13,50); t2 = getCurrentTime(); t3 = makeTime(1999,8,19,9,15); d = makeDynTime(t1,t2,t3); DebugN(d); }
Assignment
Time function
Availability
UI, CTRL, DP