-
Notifications
You must be signed in to change notification settings - Fork 21.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: timezone bug - rounding problem
Why this commit? TimeWithZone instances were unexpectedly being rounded up. What changes were made and why? Internally, .to_f was being called on TimeWithZone instances. This can lead to inaccuracies if Rationals are involved. Using .to_r instead of .to_f will be more accurate, but it does come with a slight computational cost.
- Loading branch information
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters