More timestamp corrections (#2933)

* Fix incorrect timestamp updates
* Correct folder time fields
* Add migration with new indexes
* Correct mod_time format
* Add mod_time to data massage
This commit is contained in:
WithoutPants
2022-09-20 13:52:37 +10:00
committed by GitHub
parent 98e3610ade
commit 3fa7b470e7
12 changed files with 205 additions and 165 deletions

View File

@@ -83,12 +83,12 @@ func (r *updateRecord) setNullInt(destField string, v models.OptionalInt) {
// }
// }
func (r *updateRecord) setTime(destField string, v models.OptionalTime) {
func (r *updateRecord) setSQLiteTimestamp(destField string, v models.OptionalTime) {
if v.Set {
if v.Null {
panic("null value not allowed in optional time")
}
r.set(destField, v.Value)
r.set(destField, models.SQLiteTimestamp{Timestamp: v.Value})
}
}