Revert "Fix unix timestamp in file upload"

This reverts commit 2b066997d1.
This commit is contained in:
Matt Baer 2020-01-14 12:24:57 -05:00
parent 2b066997d1
commit 65e2e5126b
1 changed files with 1 additions and 2 deletions

View File

@ -146,8 +146,7 @@ func handleImport(app *App, u *User, w http.ResponseWriter, r *http.Request) err
if collAlias != "" {
post.Collection = collAlias
}
ts := fileDates[formFile.Filename] / 1000 // Get timestamp in seconds, not milliseconds
dateTime := time.Unix(ts, 0)
dateTime := time.Unix(fileDates[formFile.Filename], 0)
post.Created = &dateTime
created := post.Created.Format("2006-01-02T15:04:05Z")
submittedPost := SubmittedPost{