Bug 410992

Summary: Currency conversion returns different USD/RUB rates for "1 USD" and "1 USD="
Product: [Plasma] krunner Reporter: Alexander Potashev <aspotashev>
Component: converterAssignee: Kai Uwe Broulik <kde>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.16.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Alexander Potashev 2019-08-16 18:31:47 UTC
SUMMARY
Currency conversion returns different USD/RUB rates for "1 USD" and "1 USD=".

STEPS TO REPRODUCE
1. Enter "1 USD" in krunner, see USD/RUB rate in the results.
2. Enter "1 USD=" in krunner, see USD/RUB rate in the results.
(RUB = Russian Ruble)

OBSERVED RESULT
"1 USD" returns 66.1678 RUB.
"1 USD=" returns 62,82880071333036 RUB.

EXPECTED RESULT
Both of these should return the same value with the same precision and formatting (notice the floating point/comma).

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 5.16.4
(available in About System)
KDE Plasma Version: 5.16.4
KDE Frameworks Version: 5.60.0
Qt Version: 5.13.0

ADDITIONAL INFORMATION
Also, it's unclear where these currency rates come from (MOEX? Central Bank of Russia?) and how old is this data.
Comment 1 2wxsy58236r3 2019-08-17 02:09:12 UTC
When entering "1 USD", kunitconversion [1] is used.
When entering "1 USD=", libqalculate [2] is used.

It looks like kunitconversion is using the data from European Central Bank ("ECB") [3], and libqalculate uses several sources including ECB [4].

From my observation, kunitconversion's update mechanism is better and the rates are usually up-to-date. If you type "1 USD" and need to wait several seconds before the result is shown, that means kunitconversion is downloading the latest currency rates.

[1] https://github.com/KDE/kunitconversion
[2] https://github.com/Qalculate/libqalculate
[3] https://github.com/KDE/kunitconversion/blob/master/src/currency.cpp
[4] https://github.com/Qalculate/libqalculate/blob/master/libqalculate/Calculator.cc