Skip to content

Conversation

@laterbreh
Copy link

@laterbreh laterbreh commented Feb 28, 2025

Uses timestamptz instead of timestamp in the postgres entities so that date comparisons are correct through out the application. timestamp saves without a timezone-- It was saving the correct UTC time but without a timezone-- so any comparisons to server time yielded incorrect values.

For example this fixed the hashrate recording and dead-client removal (because the time comparisons to save hashrates/shares never saved because of a negative difference in time during the if comparisons) etc.

I've verified this change causes no side-effects or breakages in the server side application on the postgres branch. I believe timestamptz was the original intention not timestamp.

I also should mention this fixed the offset that was also displaying on the public-pool-ui where database times where being displayed to the client.

@laterbreh laterbreh changed the title Uses timestamptz instead of timestamp so that date comparisons ar… POSTGRES: Use timestamptz instead of timestamp Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant