Skip to content

Conversation

Giacomo92
Copy link

@Giacomo92 Giacomo92 commented Feb 15, 2020

This PR was recreated from #1534

Currently laravel-mongodb strips out the millisecond value of the datetime when retrieving records or querying mongo. This PR fixes the date conversion to include the millisecond part of the date. The PR also saves created_at and updated_at with millisecond precision now.

This PR only works for PHP7 and above as I couldn't find anywhere specifying that PHP5 is supported, and travis is only testing on PHP7.

Co-Authored-By: @Flambe

Copy link
Contributor

@divine divine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using Laravel Date facade would be better. See explanation here: laravel/framework#25320
It's already available from version 5.8 so it wouldn't break something, otherwise good work!

Giacomo Fabbian and others added 11 commits February 17, 2020 12:09
Co-Authored-By: Divine <48183131+divine@users.noreply.github.com>
Co-Authored-By: Divine <48183131+divine@users.noreply.github.com>
Co-Authored-By: Divine <48183131+divine@users.noreply.github.com>
Co-Authored-By: Divine <48183131+divine@users.noreply.github.com>
Co-Authored-By: Divine <48183131+divine@users.noreply.github.com>
@Smolevich
Copy link
Contributor

@Giacomo92 resolve conflicts please

@Flambe
Copy link

Flambe commented Feb 17, 2020

@Giacomo92 Thank you for getting this up to date!

@Giacomo92 Giacomo92 closed this Feb 18, 2020
@Giacomo92 Giacomo92 changed the title [Updated PR#1534] UTCDateTime conversion now includes milliseconds [Ignore] UTCDateTime conversion now includes milliseconds Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants