05-06-2019, 07:07 PM
Member function DateTime.FromUnix
Member function DateTime.ToUnix
function long'time_t
;Initializes this variable from a C/Unix date/time - seconds since midnight January 1, 1970 UTC, aka C type time_t.
;REMARKS
;To store Unix time you can use a variable of type int or long. Use long to avoid the year 2038 problem.
;<link>https://en.wikipedia.org/wiki/Year_2038_problem</link>
;EXAMPLE
;DateTime t.FromUnix(0)
;out t.ToStr(4)
;out t.ToUnix
t=time_t*10000000+116444736000000000
Member function DateTime.ToUnix
function'long
;Converts to C/Unix date/time - seconds since midnight January 1, 1970 UTC, aka C type time_t.
;REMARKS
;To store Unix time you can use a variable of type int or long. Use long to avoid the year 2038 problem.
;<link>https://en.wikipedia.org/wiki/Year_2038_problem</link>
ret t-116444736000000000/10000000