3 ms·
Be aware that currencies are stuck with rates from several years ago and don’t update.
by ornornor 6y ago
Be aware that currencies are stuck with rates from several years ago and don’t update.
- divbzero 6y agoI wonder if this could be addressed with periodic updates.
- ornornor 6y agoI 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?
- throwaway744678 6y agoLooking 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
- zerocrates 6y agoI'm tempted to say it shouldn't even attempt to support currency conversion, as constantly in flux as it is.
- gerdesj 6y ago$ units Currency exchange rates from FloatRates (USD base) on 2019-06-05
- duckerude 6y agoRunning `sudo units_cur` does the trick for me. $ 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 (GNU units, packed by Debian)
- throwaway8941 6y agoIn case anyone else needs this: # systemctl edit units-currency-update.service [Unit] Description=Update units(1) currency rates [Service] Type=oneshot Nice=19 ExecStart=/usr/bin/units_cur # systemctl edit units-currency-update.timer [Unit] Description=Update units(1) currency rates [Timer] OnCalendar=daily AccuracySec=3h Persistent=true [Install] WantedBy=timers.target # systemctl daemon-reload # systemctl enable units-currency-update.timer