-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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: Time loses microseconds #9081
Conversation
This may break existing apps. So I will send it to |
06bbcca
to
8fdd362
Compare
4e892ef
to
da64622
Compare
Added the docs, and fixed a bug in Time::toDateTime(). |
381f396
to
5a2a67c
Compare
Fixed |
5a2a67c
to
d438d05
Compare
c68a3fb
to
56c6c46
Compare
Fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
👋 Hi, @kenjis! |
dea9d5b
to
ed29b50
Compare
Description
Fixes #9079
Since PHP 7.1, DateTime constructor incorporates microseconds.
See https://www.php.net/manual/en/migration71.incompatible.php#migration71.incompatible.datetime-microseconds
and
Time
constructor also holds microseconds in most cases.But some methods below in
Time
lost microseconds.__construct()
... not all casescreateFromFormat()
createFromInstance()
toDateTime()
setTestNow()
equals()
sameAs()
isBefore()
isAfter()
Also fixes:
DatetimeCast::set()
Checklist: