diff --git a/database.go b/database.go index f474ae9..fcfb9ca 100644 --- a/database.go +++ b/database.go @@ -661,7 +661,7 @@ func (db *datastore) CreatePost(userID, collID int64, post *SubmittedPost) (*Pos // SQLite stores datetimes in UTC, so convert time.Now() to it here created = created.UTC() } - if post.Created != nil { + if post.Created != nil && *post.Created != "" { created, err = time.Parse("2006-01-02T15:04:05Z", *post.Created) if err != nil { log.Error("Unable to parse Created time '%s': %v", *post.Created, err)