Hello, well on linux using stat i get " > Size: 21444 Blocks: 48 IO Block: 131072 regular file
Device: 0,48 Inode: 15312374 Links: 1
Access: (0777/-rwxrwxrwx) Uid: ( 1026/ UNKNOWN) Gid: ( 100/ users)
Access: 2024-11-11 12:56:37.560192905 +0200
Modify: 2024-10-25 22:36:11.000000000 +0300
Change: 2024-10-30 06:32:10.163132283 +0200
Birth: -
" while on the code to get the timestamp i get nothing , my db is empty at that file on CreationDate and ModificationDate. It seems that those files came from a Windows machine and when they zip them the files lost all the timestamp part as it got as timestamp the unzip date which in this case is Modify , which is bad for me , but still nothing from XOJO side ,and this is not the first time it happens. and i do check for file existence and it finds it
What values do file.CreationDateTime and file.ModificationDateTime have? Are they Nil? or do they point to a DateTime? If the latter, what are the values in teh DateTime object?
Coming back to this as apparently it is a big headache, and I just did a test with latest public XOJO.
I just did a simple app to scan the files and save the path and the CreationDate and ModifiedDate and I get things like the picture, and you can clearly see that it is wrong .
Code is simple .
Var fName As String
Var fPath As String
If file <> Nil And file.Exists Then
fName = file.Name
fPath = file.NativePath
If mIsConnected Then
Var row As New DatabaseRow
row.Column("fileName").StringValue = fName
row.Column("filePath").StringValue = fPath
row.Column("createdDate").DateTimeValue = file.CreationDateTime
row.Column("modifiedDate").DateTimeValue = file.ModificationDateTime
Try
db.AddRow("files", row)
Catch e As DatabaseException
mIsConnected = False
stdout.WriteLine("Error : " + e.Message)
Return
End Try
End If
End If
Which clearly shows that the proper date should be reverse. You cannot have a creation Date Prior to the Modified date.
Can Someone from @Xojo have a look on this as I created cases in the past and still not fixed until now.
The SQL DateTime format is: YYYY-MM-DD HH:MM:SS for anyone wondering.
Looks like the modified date is before the created date and that would make no sense.