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 makeTime() function returns the time specified in the argument in internal time format. makeTime works like setTime(), but without writing the time to an argument variable.

Note that the specified and split time is represented as local time (not UTC), while the resulting variable value for time/atime is subsequently represented as UTC time and thus seconds since 1.1.1970. For the conversion of time values, see chapter Conversion of time values.

Note: If the daylight saving parameter of the function makeTime() is not explicitly set, behaviour of this method depends on the operating system and a switch in autumn during the daylight-saving-time can lead to different results between Windows and Linux. Linux might also provide different values if this method is repeatedly called with a time value that comes from the daylight saving time rollback window interval. Linux may also provide different values for repeated calls of this method during this one hour daylight saving rollback window.

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