فهرست منبع

fix formatting for date

Alexander Belanger 3 سال پیش
والد
کامیت
8e3a4148e3
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      internal/notifier/sendgrid/incident_notifier.go

+ 2 - 2
internal/notifier/sendgrid/incident_notifier.go

@@ -46,7 +46,7 @@ func (s *IncidentNotifier) NotifyNew(incident *types.Incident, url string) error
 					"app_url":       url,
 					"subject":       fmt.Sprintf("Your application %s crashed on Porter", incident.ReleaseName),
 					"preheader":     incident.Summary,
-					"created_at":    fmt.Sprintf("%v", incident.CreatedAt),
+					"created_at":    fmt.Sprintf("%s", incident.CreatedAt.Format("Jan 2, 2006 at 3:04pm (MST)")),
 				},
 			},
 		},
@@ -85,7 +85,7 @@ func (s *IncidentNotifier) NotifyResolved(incident *types.Incident, url string)
 					"app_url":                url,
 					"subject":                fmt.Sprintf("[Resolved] The incident for application %s has been resolved", incident.ReleaseName),
 					"preheader":              incident.Summary,
-					"resolved_at":            fmt.Sprintf("%v", incident.UpdatedAt),
+					"resolved_at":            fmt.Sprintf("%s", incident.UpdatedAt.Format("Jan 2, 2006 at 3:04pm (MST)")),
 				},
 			},
 		},