Skip to content

Commit

Permalink
Merge pull request #326 from synthead/add-dst-spec-for-protocol-6-time
Browse files Browse the repository at this point in the history
Add protocol 6 Time spec for time in DST
  • Loading branch information
synthead authored Aug 13, 2023
2 parents 30642fb + 305377b commit c15615e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/lib/timex_datalink_client/protocol_6/time_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@
]
end

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, 0x13, 0x1c, 0x0a, 0x15, 0x0f, 0x1a, 0x0e, 0x1e, 0x02, 0x18, 0x01, 0x00]
]
end

context "when time has a UTC offset of -11:00" do
let(:utc_offset) { "-11:00" }

Expand Down

0 comments on commit c15615e

Please sign in to comment.