Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timezone handling #13

Merged
merged 4 commits into from
Jul 5, 2017
Merged

Conversation

domodwyer
Copy link

See go-mgo#464.

@reenjii I hope you don't mind us pulling it to our fork, it's a good catch - I'm pretty surprised this hasn't been noticed before! If you'd rather we didn't pull this, please let me know and we'll sort something out.

Thanks!

reenjii and others added 3 commits July 4, 2017 17:19
Time zone in time format for JSON (un)marshaling is wrong.
All dates used to be parsed in UTC.
See numeric time zone offsets in: https://golang.org/pkg/time/#pkg-constants
…-timezone

# Conflicts:
#	bson/json.go
#	bson/json_test.go
@domodwyer domodwyer merged commit a724dca into development Jul 5, 2017
@domodwyer domodwyer deleted the bugfix/reenjii-fix-json-timezone branch July 5, 2017 13:30
@reenjii
Copy link

reenjii commented Jul 6, 2017

@domodwyer Sure no problem. My use case is a basic go tool that parses a mongo query written in JSON to run on a server where mongo cli is not available. The unmarshaller failed to parse my queries using non-UTC dates and I was surprised as well when I saw the time format used :)

@domodwyer domodwyer mentioned this pull request Jul 26, 2017
@inancgumus inancgumus mentioned this pull request Jul 27, 2017
libi pushed a commit to libi/mgo that referenced this pull request Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants