Skip to content

Latest commit

 

History

History
42 lines (35 loc) · 888 Bytes

mktime.adoc

File metadata and controls

42 lines (35 loc) · 888 Bytes

mktime()

Important

Deprecated in 5.0.

Please use [class-datetime] class.

mktime(time) => void

Converts broken down time (represented by object of [class-datetime] class) to UNIX time (number of seconds since epoch). [class-datetime] object can be returned by localtime or gmtime functions or created using operator new. Broken down time assumed to be local time.

Table 1. Parameters

time

[class-datetime]

Broken down time.

Return

UNIX time (number of seconds since epoch).

Example
t = new TIME();  // create new TIME object
t.year = 2018;
t.mon = 3;	// April (0-based month numbering)
t.mday = 10;
t.hour = 10;
t.min = 16;
t.sec = 55;
t.isdst = -1;	// auto detect daylight saving
println(mktime(t)); //Will print "1523344615"