-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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.get_unix_time_from_system()
not including msecs
#64101
Conversation
I would also document the difference between |
Added a note for
|
Thanks! |
Cherry-picked for 3.5.1. |
I think this is a pretty bad change to be honest. It's a breaking change and it would have deserved an own function. |
The documentation of |
In 3.5 this code:
returns this:
In 3.5.1:
Both of them are floats as you mention. As we were converting to string to use inside custom expressions, and then parsing it, that "." was causing bugs that werent in 3.5 |
When converting a float to string, how to handle the fraction part should always be considered I think. Since the documentation in 3.5 mentioned that the return value is in seconds and explained it's float for sub-second precision, I believe the bug in 3.5 hide the bug in your code, and fixing the engine bug exposed the bug in your code rather than causing it. |
yeah you are right. Thanks for taking time to answer! |
Fixes #64059
OS::get_unix_time()
is stilluint64_t
on 3.x. So a dedicatedOS::get_subsecond_unix_time()
is added.This new function is intended to be used only by
Time
so it's not exposed to scripting.