mktime/2

"mktime(+Datime, - Seconds" )

The @ref mktime_50 @"mktime/2" procedure receives a compound term of the form datime(+ _Year, + Month, + DayOfTheMonth, + Hour, + Minute,

  • Second)_ and returns the number of Seconds elapsed since 00:00:00 on January 1, 1970, Coordinated Universal Time (UTC). The user provides information on Year, Month, DayOfTheMonth, Hour, Minute, and Second. The Hour is given on local time.

The predicate uses the WIN32 GetLocalTime function or the Unix mktime function.


 ?- mktime(datime(2001,5,28,15,29,46),X).

 X = 991081786 ? ;