Skip to content

Commit

Permalink
Cleaned up.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Oct 22, 2024
1 parent 884472c commit fbe42a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/typing/ext/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ type ExtendedTime struct {
}

// MarshalJSON is a custom JSON marshaller for ExtendedTime.
// This is only used for nested MongoDB objects where there may be nested DateTime values.
func (e ExtendedTime) MarshalJSON() ([]byte, error) {
// This is consistent with how MongoDB's Go driver marshals time.Time
return e.ts.UTC().MarshalJSON()
Expand Down

0 comments on commit fbe42a6

Please sign in to comment.