MCPcopy
hub / github.com/kopia/kopia / convertTimezone

Function convertTimezone

cli/show_utils.go:81–97  ·  view source on GitHub ↗
(ts time.Time)

Source from the content-addressed store, hash-verified

79}
80
81func convertTimezone(ts time.Time) time.Time {
82 switch timeZone {
83 case "local":
84 return ts.Local()
85 case "utc":
86 return ts.UTC()
87 case "original":
88 return ts
89 default:
90 loc, err := time.LoadLocation(timeZone)
91 if err == nil {
92 return ts.In(loc)
93 }
94
95 return ts
96 }
97}
98
99func formatCompressionPercentage(original, compressed int64) string {
100 if compressed >= original {

Callers 2

formatTimestampFunction · 0.85
formatTimestampPreciseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected