ripple / validator-history-service

Service for ingesting, aggregating, storing, and disbursing XRP Ledger validation related data.
ISC License
14 stars 7 forks source link

fix: validator report timestamp #195

Closed pdp2121 closed 5 months ago

pdp2121 commented 5 months ago

High Level Overview of Change

There was a bug in response format for individual validator reports (/validator/{pubkey}/reports) that caused the date to be in the future for timezone later than UTC. Set the hour of the date to be 0 instead of 23 would fix this issue, and also correspond with how daily scores save their dates and the /validator_reports.

Addressing https://github.com/ripple/validator-history-service/issues/194

Type of Change

Test Plan

The effect of this change has been tested locally by changing browser's timezone

Future Tasks

Date time on the Explorer should all be in UTC with a specified note to ensure consistency in the data that users in various regions see.

mvadari commented 5 months ago

Will this work okay when it changes and isn't starting from scratch?

pdp2121 commented 5 months ago

Will this work okay when it changes and isn't starting from scratch?

@mvadari The dates in the database are already zeroed out. This change does not affect data in db, just on api side when it convert the date so I don't think it would have any significant effect when we deploy halfway (at least on VHS and Explorer, not sure about other apps using this api)