mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-09-03 21:15:37 +02:00
Another small tz+dst parsing testcase
This commit is contained in:
parent
99710e7db3
commit
b76e78768c
@ -10,7 +10,7 @@ import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class BLETypeConversionsTest extends TestBase {
|
||||
@Test
|
||||
public void testTimeParsing() {
|
||||
public void testTimeParsing1() {
|
||||
byte[] requested = new byte[] {
|
||||
(byte) 0xe1, 0x07, 0x0a, 0x1d, 0x00, 0x1c, 0x00,0x08
|
||||
};
|
||||
@ -22,4 +22,18 @@ public class BLETypeConversionsTest extends TestBase {
|
||||
|
||||
assertTrue(calRequested.getTime().equals(calReceived.getTime()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTimeParsingWithDST() {
|
||||
byte[] requested = new byte[] {
|
||||
(byte) 0xe1,0x07,0x0a,0x09,0x11,0x23,0x00,0x08
|
||||
};
|
||||
byte[] received = new byte[] {
|
||||
(byte) 0xe1,0x07,0x0a,0x09,0x10,0x23,0x00,0x04
|
||||
};
|
||||
GregorianCalendar calRequested = BLETypeConversions.rawBytesToCalendar(requested, false);
|
||||
GregorianCalendar calReceived = BLETypeConversions.rawBytesToCalendar(received, false);
|
||||
|
||||
assertTrue(calRequested.getTime().equals(calReceived.getTime()));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user