[Gambas-user] Unix time format
mbelmonte at belmotek.net
Fri Aug 5 10:03:57 CEST 2022
El 4/8/22 a las 21:09, T Lee Davidson escribió:
> When I use `stat` on a file, I get a format different than what you
stated; eg. "2022-01-01 13:30:47.592253508 -0500"
Ok, it is correct, but I use a class that is an implementation of "libc"
Public Struct stat_
st_mtime As Long
Private Const _STAT_VER_LINUX As Integer = 1
Private Extern __xstat(_STAT_VER As Integer, __path As String, __statbuf
As Stat_) As Integer
Then i get a long number for dates, which is very useful for comparing
> But, no matter, perhaps what you are looking for is the FromUnixTime
method of Date (gb.util).
Cool, Date.ToUnixTime is what I need, because is faster operate directly
whit unix time due to the fact that it is not necessary to convert the
Config.LastScann = Date.ToUnixTime(Now())
More information about the User