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

Add protocol 6 Time spec for time in DST #326

Merged
merged 1 commit into from
Aug 13, 2023

Conversation

synthead
Copy link
Owner

Fixes #325!

This PR adds a spec to ensure that a time in DST is doing what it should.

From #325:

This PR fixed a bug where the time on the Beepwear Pro (protocol 6) was set one hour fast for a time in daylight savings time:

It removed this spec, since daylight savings time is now handled without any special circumstances:

context "when time is in daylight savings time" do
let(:tzinfo) { TZInfo::Timezone.get("US/Pacific") }
let(:time) { tzinfo.local_time(2015, 10, 21, 19, 28, 32) }
it_behaves_like "CRC-wrapped packets", [
[0x32, 0x01, 0x20, 0x14, 0x1c, 0x0a, 0x15, 0x0f, 0x1a, 0x0e, 0x1e, 0x02, 0x18, 0x01, 0x00]
]
end

However, it'd still be good to have this spec in place to ensure that it isn't being treated with any special circumstances 👍

@synthead synthead self-assigned this Aug 13, 2023
@synthead synthead added enhancement New feature or request protocol 6 Specific to protocol 6 labels Aug 13, 2023
@synthead synthead merged commit c15615e into main Aug 13, 2023
5 checks passed
@synthead synthead deleted the add-dst-spec-for-protocol-6-time branch August 13, 2023 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request protocol 6 Specific to protocol 6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Time spec for protocol 6 to test daylight savings time
1 participant