[Gambas-user] Unix time format

Martin mbelmonte at belmotek.net
Thu Aug 4 20:34:23 CEST 2022


Hi,
I want to compare the timestamp (mtime) from files provided by the stat 
command, as you know is something like "1659639479"

I made a function (please see below)
Maybe gambas include some native method or function?

Static Public Function TimeUnix(datTime As Date) As Integer

   Return DateDiff(Date(1970, 1, 1, 0, 0, 0), datTime, gb.Second)

End

Regards.
Martín.


More information about the User mailing list