Skip to content

Commit

Permalink
Fix bug with wrong Swedish translator
Browse files Browse the repository at this point in the history
  • Loading branch information
gouguoyin committed Sep 6, 2023
1 parent f72a33d commit eb56fa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion json.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (t Date) MarshalJSON() ([]byte, error) {
// UnmarshalJSON implements the interface json.Unmarshal for Date struct.
// 实现 UnmarshalJSON 接口
func (t *Date) UnmarshalJSON(b []byte) error {
c := ParseByLayout(string(bytes.Trim(b, `"`)), DateLayout)
c := ParseByLayout(string(bytes.Trim(b, `"`)), DateLayout, t.Location())
if c.Error == nil {
*t = Date{c}
}
Expand Down

0 comments on commit eb56fa8

Please sign in to comment.