MCPcopy Create free account
hub / github.com/github/gh-aw / formatConfiguredTimeValue

Function formatConfiguredTimeValue

pkg/console/timezone.go:32–41  ·  view source on GitHub ↗
(timeVal time.Time)

Source from the content-addressed store, hash-verified

30}
31
32func 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
43func formatUTCOffset(offsetSeconds int) string {
44 sign := "+"

Callers 1

formatTimeValueFunction · 0.85

Calls 2

currentTimeLocationFunction · 0.85
formatUTCOffsetFunction · 0.85

Tested by

no test coverage detected