dfinity / exchange-rate-canister

The exchange rate canister (XRC) makes use of the HTTP requests feature to provide exchange rates as a service to the IC.
Apache License 2.0
37 stars 10 forks source link

Fix end of day computation and corresponding tests #193

Closed yotamhc closed 1 year ago

yotamhc commented 1 year ago

The calculation for the end of the day should add 36 hours to the start of the day at UTC. Before, we only added 12 hours which brought us to the beginning of that day UTC-12. This PR fixes this by finding the timezone for the western-most forex source and considering its time as the end of the day.