Fix dates

This commit is contained in:
Stash Dev 2019-03-04 19:37:22 -08:00
parent b70d5f33d2
commit 8d23357a13
1 changed files with 3 additions and 1 deletions

View File

@ -22,8 +22,10 @@ func (t *SQLiteDate) Scan(value interface{}) error {
}
t.String = dateTime.Format("2006-01-02")
if t.String != "" {
if t.String != "" && t.String != "0001-01-01" {
t.Valid = true
} else {
t.Valid = false
}
return nil
}