timeDisplay formats a time in the local timezone in RFC3339 format.
(t time.Time)
| 80 | // timeDisplay formats a time in the local timezone |
| 81 | // in RFC3339 format. |
| 82 | func timeDisplay(t time.Time) string { |
| 83 | localTz, err := tz.TimezoneIANA() |
| 84 | if err != nil { |
| 85 | localTz = time.UTC |
| 86 | } |
| 87 | |
| 88 | return t.In(localTz).Format(time.RFC3339) |
| 89 | } |
| 90 | |
| 91 | // relative relativizes a duration with the prefix "ago" or "in" |
| 92 | func relative(d time.Duration) string { |
no test coverage detected