Closed pavkam closed 5 years ago
To make it clear - running the test suite on Delphi/DUnit - everything is green. Running the same tests under Linux/FPC results in about 12 failures. All of them related to the fact that millis. lose precision.
For example, one failure is related to the UTC offset between two dates: 3599 vs 3600 seconds. The issue is that the milliseconds are 3599.9999... So there is deep rounding error during calculation operations.
Not sure that we can prevent them though. I tried EncodeDateTime in FPC with the same values. And the resulting Date/Time delta is still erroneous.
Fixed the tests. There is no conversion loss. But made sure to use Int64 in arithmetic.
Invalid millisecond values in TDateTime manipulated in FPC. Might require some rounding.