-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
v3.2.1 created_at, and updated_at stored as 0. #1131
Comments
@jenssegers downgrading to v3.2.0 fixed the datetime issue, I am using laravel 5.3. |
Damn that is weird, I'll check it out. |
I'm not seeing this behaviour in my unit tests though |
Can confirm this is happening for us as well in several of our projects after upgrading to 3.2.1 edit: |
@staf are you running php 7 or php 5? |
I'm running 7. A coworker on 5.6 had the same issue. But a driver upgrade from 1.1 to 1.2 solved it in either case. |
Hi, I am having a similar issue, dates (created_at, updated_at) of all models are saving like ISODate("1970-01-01T00:00:00Z"), always this same date I had to downgrade to 3.2.0 and all works fine again, I have this problem only in server (Ubuntu 14 and PHP 7.0) but not in my machine (win10, php7.0) |
confirmed, php7, both of my setups, laravel 5.4 and lumen 5.2, all 6 of my models |
Issue exists with PHP 7.0 and MongoDB 1.2.5 driver. Had to downgrade to 3.2.0 and its working. |
@jenssegers this is happening now with version 3.2.0 on win10 also |
Could someone do a PR to revert the previous change to fix this issue? |
I also had the same problem. Updated mongodb driver and problem was fixed. I'm using PHP 7. Those who experience this issue, try updating mongodb driver. |
@Endijs to what version? i always keep mine up to date |
@acidjazz $ php --ri mongodb mongodb MongoDB support => enabled |
@Endijs you sure your dates are being stored correctly now? if this is the solution then @jenssegers can we somehow put a stipulation on this version to require that version of the php driver to help avoid this severe issue? |
@acidjazz Well - for me it worked out (just like for @staf ). At least i can't spot any new records with 0 anymore. However @domagala is also using 1.2.5 and is reporting that issue still persists. Thus it looks like sometimes that fixes the problem, but not always. Maybe something else is at play here. |
Closing, merged in #1148. |
Hi,
After the recent update, the created_at and updated_at values are stored as shown below:
[updated_at] => MongoDate Object (
[sec] => 0
[usec] => 0
)
[created_at] => MongoDate Object (
[sec] => 0
[usec] => 0
)
The text was updated successfully, but these errors were encountered: