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

Saving a document with a date field in it causes the date value to revert to epoch time #52

Closed
asabhaney opened this issue Nov 1, 2012 · 3 comments

Comments

@asabhaney
Copy link

@asabhaney asabhaney commented Nov 1, 2012

Hello, I'm also having a problem with dates. Whenever I try and save a document containing a date, the date seems to reset to what seems like UNIX epoch time:

ISODate("1969-12-31T17:00:00-07:00")

When saving the document, I see that the response contains an error:

Warning: MongoDate::__construct() expects parameter 1 to be long, string given in /[...]/genghis.php on line 18

I am using MAMP (PHP 5.3.6), Mongo 2.2.0, and the version of the PHP driver I'm using is 1.2.12.

@bobthecow bobthecow closed this in f3dffe8 Nov 1, 2012
@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Nov 1, 2012

Ooh. Sorry about that. I just fixed this regression, download v2.1.3 to get the fix.

Thank you for reporting this.

@asabhaney
Copy link
Author

@asabhaney asabhaney commented Nov 1, 2012

Awesome, dates work perfectly now. Thanks!

@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Nov 1, 2012

No problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.