Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Ruuvi Gateway data being ignored when system is not using UTC time #87384

Merged
merged 1 commit into from
Feb 4, 2023

Conversation

akx
Copy link
Contributor

@akx akx commented Feb 4, 2023

Proposed change

The stale data comparison in the Ruuvi Gateway integration did the Wrong Thing around timezones, so if your system timezone is UTC+anything, all data was and ignored.

I'm not sure why this worked with HA 38f183a (#84853) and has now broken.

This should probably be released in a bugfix version of 2023.2.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the dev checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

@bdraco bdraco added this to the 2023.2.2 milestone Feb 4, 2023
@akx
Copy link
Contributor Author

akx commented Feb 4, 2023

@bdraco I can switch this switched this to use UNIX time comparisons – that should be both faster and more bulletproof?

@akx akx requested a review from bdraco February 4, 2023 18:05
@akx akx changed the title Ruuvi Gateway: use utcnow for timestamp comparison Ruuvi Gateway: use UNIX times for timestamp comparison Feb 4, 2023
@bdraco bdraco changed the title Ruuvi Gateway: use UNIX times for timestamp comparison Fix Ruuvi Gateway data being ignored when system is not using UTC time Feb 4, 2023
@bdraco bdraco merged commit 72cb58e into home-assistant:dev Feb 4, 2023
@balloob balloob mentioned this pull request Feb 5, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Feb 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants