-
Notifications
You must be signed in to change notification settings - Fork 283
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
FromNow format - incorrect counting #1141
Comments
Yeah it is a bug... |
Bug in PeriodBetween function? |
I dont know, maybe... technically day is different however it is true what is only 2hs 20min of difference. |
Maybe check this too "22:00 1st day - 00:20 3rd day"? Must be 1d 2h, not 2d 2h |
I think this correction: |
Additional check needed for other date/time components in PeridBetween. Maybe if Day(Anow)<Day(Athen) - decrease of Month is needed. And same for Month numbers which affect Year |
Tested other components of datetime, only Days are affected. Months and Years are always correct. But PeriodBetween flips values if they are in reversed order. And my final correction for Days is: And for next line I suppose sign correction is preferred too: |
Thank you for your work in this... When we call the function HumanReadableTime(ANow,AThen: TDateTime): string; the first parameter is the function Now what return the current day/hour so that value would be always older what AThen. |
Yes, but incorrect datetime possible not only on user side but on the torrents creator side f.e. Additional check not so time consuming I think |
Fix (definitely I hope) in c8e84bd |
v5.15.4, when date/time (f.e. added) is, f.e. 22:00 1st day and now is 00:20 2nd day - it shows 1d 2h. But only 2h 20min elapsed. Maybe depends from timezone (my is GMT+3)
The text was updated successfully, but these errors were encountered: