diff --git a/stats.go b/stats.go index fd7d4ce9..4313eb93 100644 --- a/stats.go +++ b/stats.go @@ -5,6 +5,8 @@ import ( "time" ) +const iso8601date = "2006-01-02" + type Stat struct { Event string `json:"event"` TotalCount int `json:"total_count"` @@ -32,7 +34,7 @@ func (m *MailgunImpl) GetStats(limit int, skip int, startDate *time.Time, event } if startDate != nil { - r.addParameter("start-date", startDate.Format(time.RFC3339)) + r.addParameter("start-date", startDate.Format(iso8601date)) } for _, e := range event {