Open LittleLydia opened 1 year ago
Precision is lost from the date formatter that is used internally to store the date.
If you need perfect precision you need to store dates as a double. Otherwise you cannot guarantee equality.
Precision is lost from the date formatter that is used internally to store the date.
If you need perfect precision you need to store dates as a double. Otherwise you cannot guarantee equality.
OK. I got it. I solved this by saving timestamp. Thanks for the reason.
Build Information
SQLite.swift version = 0.92 Xcode version = 14.1 macOS version = 13.2.1
General guidelines
I use touch to create a new file ,zero bytes , like touch abcd. then I read the modificationDate by using
let modifyDate = try FileManager.default.attributesOfItem(atPath: wholePath)[.modificationDate] as? Date
its description like this `▿ 2023-06-07 02:14:52 +0000but after I fetch it from the db.sqlite, it turns out to be: ▿ 2023-06-07 02:14:52 +0000
Other files which is larger than zero bytes are fine. Just this one. I am really sure before I save it in the db, it is 707796892.7651631
Don't know why