Skip to content
Permalink
Browse files

change logging to always output the same date format

longer but looks nicer when you query the past few days
  • Loading branch information...
tj committed Mar 15, 2018
1 parent 6d27f34 commit 73cd81b979b82e12756f28cec3925f9a7e0fad81
Showing with 1 addition and 8 deletions.
  1. +1 −8 internal/logs/text/text.go
@@ -177,14 +177,7 @@ var day = time.Hour * 24

// formatDate formats t relative to now.
func formatDate(t time.Time) string {
switch d := time.Since(t); {
case d >= day*7:
return t.Format(`Jan 2` + util.DateSuffix(t) + ` 03:04:05pm`)
case d >= day:
return t.Format(`2` + util.DateSuffix(t) + ` 03:04:05pm`)
default:
return t.Format(`03:04:05pm`)
}
return t.Format(`Jan 2` + util.DateSuffix(t) + ` 03:04:05pm`)
}

// version returns the entry version via GIT commit or lambda version.

0 comments on commit 73cd81b

Please sign in to comment.
You can’t perform that action at this time.