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

Function formatUTCOffset

pkg/console/timezone.go:43–53  ·  view source on GitHub ↗
(offsetSeconds int)

Source from the content-addressed store, hash-verified

41}
42
43func formatUTCOffset(offsetSeconds int) string {
44 sign := "+"
45 if offsetSeconds < 0 {
46 sign = "-"
47 offsetSeconds = -offsetSeconds
48 }
49
50 hours := offsetSeconds / 3600
51 minutes := (offsetSeconds % 3600) / 60
52 return fmt.Sprintf("%s%02d:%02d", sign, hours, minutes)
53}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected