Merge pull request #383 from simon04/date-format

Use ISO 8601 date format (yyyy-mm-dd)
This commit is contained in:
Anna 2018-05-04 13:16:21 +01:00 committed by GitHub
commit f9723f67b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -398,10 +398,10 @@ outer:
return nil
}
// Formats a unix timestamp to yyyy/mm/dd
// Formats a unix timestamp to ISO 8601 date (yyyy-mm-dd)
func formatTime(i int) string {
t := time.Unix(int64(i), 0)
return fmt.Sprintf("%d/%02d/%02d", t.Year(), int(t.Month()), t.Day())
return t.Format("2006-01-02")
}
const (