Closed juliencharrel closed 1 year ago
and bookings might be broken
can you elaborate how this would affect bookings in the contracts?
The current issue is in test, the TS that is testing the timestamp is doing calculations with a difference timezone that the test hardhat EVM. That's the main cause of this error.
Timestamps are calculated in the contract, the client should send year
and day of the year
(1-365).
Client should make sure that those two params are calculated from a UTC time before sending them to the blockchain.
Why should the client calculate that from a UTC time? If the client only sends year and day of the year that can be independent of timezoning
And good to know it does not impact booking
Why should the client calculate that from a UTC time? If the client only sends year and day of the year that can be independent of timezoning
usually that should be the case but client has to make sure that if you click 01/02/2023 at 23:00 the dayOfYear
calculation returns 32 not 33 which should be obvious but if you execute in the client and do some time calculations to generate the day of the year could mess up this result. Just to be aware
CI is working, would be nice that the next developer that finds this issue fixes it. I close it for now
Maybe in other timezones too.