$ units
Currency exchange rates from FloatRates (USD base) on 2020-05-12
$ sudo units_cur
$ units
Currency exchange rates from FloatRates (USD base) on 2020-07-09
Looking at the source of the default configuration (cat /usr/share/misc/units.lib), I believe it only defines conversions for currencies that are pegged to another one (mainly to EUR or USD).
You have: 10 franc
You want: dollar
conformability error
1.5244902 euro
1 usdollar
You have: 10 franc
You want: euro
* 1.5244902
/ 0.655957
I didn’t look too deep into it, my understanding was that the source it uses to update itself has been taken offline. There are workarounds involving data massaging and a cron but honestly that’s a lot more work than typing “1000 chf to usd” into ddg and getting the converted amount. But if you know something I don’t, maybe you could share for everyone’s benefit?
Running `sudo units_cur` does the trick for me.
(GNU units, packed by Debian)
In case anyone else needs this:
Looking at the source of the default configuration (cat /usr/share/misc/units.lib), I believe it only defines conversions for currencies that are pegged to another one (mainly to EUR or USD).
I'm tempted to say it shouldn't even attempt to support currency conversion, as constantly in flux as it is.
I wonder if this could be addressed with periodic updates.
I didn’t look too deep into it, my understanding was that the source it uses to update itself has been taken offline. There are workarounds involving data massaging and a cron but honestly that’s a lot more work than typing “1000 chf to usd” into ddg and getting the converted amount. But if you know something I don’t, maybe you could share for everyone’s benefit?