Skip to content

Commit

Permalink
Custom datetime parse format
Browse files Browse the repository at this point in the history
  • Loading branch information
bodqhrohro committed Sep 22, 2019
1 parent 4fe5ba1 commit 5f28f5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion smstree.go
Expand Up @@ -99,7 +99,7 @@ func addEntryFromMBoxMessage(msg *mail.Message) error {
dateTimeRFC := headers.Get("Date")
dateTimeShort := ""
if dateTimeRFC != "" {
dateTime, err := time.Parse(time.RFC1123Z, dateTimeRFC)
dateTime, err := time.Parse("Mon, _2 Jan 2006 15:04:05 -0700", dateTimeRFC)
if err == nil {
dateTimeShort = dateTime.Format("02/01/2006 15:04:05")
} else {
Expand Down

0 comments on commit 5f28f5b

Please sign in to comment.