Skip to content

Commit

Permalink
fix(JsonTimeISO8601): use UTC TZ for String()
Browse files Browse the repository at this point in the history
+ Amazon seems to only accept UTC timezone in some cases
https://github.com/amzn/selling-partner-api-docs/issues/3324
#48
  • Loading branch information
Coffeeri committed Dec 22, 2023
1 parent 580ac2d commit 194ce4d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apis/json_time.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ func (t JsonTimeISO8601) MarshalJSON() ([]byte, error) {
}

func (t JsonTimeISO8601) String() string {
return t.Format(time.RFC3339)
if t.IsZero() {
return ""
}
return t.UTC().Format(time.RFC3339)
}

0 comments on commit 194ce4d

Please sign in to comment.