(timeVal time.Time)
| 30 | } |
| 31 | |
| 32 | func formatConfiguredTimeValue(timeVal time.Time) string { |
| 33 | location := currentTimeLocation() |
| 34 | if location == nil { |
| 35 | return timeVal.Format("2006-01-02 15:04:05") |
| 36 | } |
| 37 | |
| 38 | localTime := timeVal.In(location) |
| 39 | _, offsetSeconds := localTime.Zone() |
| 40 | return fmt.Sprintf("%s UTC%s", localTime.Format("2006-01-02 15:04:05"), formatUTCOffset(offsetSeconds)) |
| 41 | } |
| 42 | |
| 43 | func formatUTCOffset(offsetSeconds int) string { |
| 44 | sign := "+" |
no test coverage detected