Skip to content

Commit 12e14f6

Browse files
authored
Merge pull request #1 from feliciegodineau/patch-1
Handle timezone offset
2 parents 1d74ea4 + afbd216 commit 12e14f6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

GoDateFormat.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ const (
2222
tt = "PM"
2323
Z = "MST"
2424
ZZZ = "MST"
25+
26+
o = "Z07:00"
2527
)
2628

2729
func ConvertFormat(format string) (string){
@@ -95,6 +97,9 @@ func ConvertFormat(format string) (string){
9597

9698
if strings.Contains(goFormate, "tt"){
9799
goFormate = strings.Replace(goFormate, "tt", tt, -1)
100+
}
101+
if strings.Contains(goFormate, "o"){
102+
goFormate = strings.Replace(goFormate, "o", o, -1)
98103
}
99104
return (goFormate)
100105
}

0 commit comments

Comments
 (0)