diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-09-17 15:50:19 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-09-17 15:50:19 +1200 |
commit | 7e2ed343d2a6a03938c3f074417464c63d31fd59 (patch) | |
tree | 61dd514f7618ac07b56ccfd84f607e3d8b7c4b98 /test/org/traccar | |
parent | da5286acb0c81f5b9bfe92eaa30e9759e3fff6b5 (diff) | |
download | traccar-server-7e2ed343d2a6a03938c3f074417464c63d31fd59.tar.gz traccar-server-7e2ed343d2a6a03938c3f074417464c63d31fd59.tar.bz2 traccar-server-7e2ed343d2a6a03938c3f074417464c63d31fd59.zip |
Remove joda time library
Diffstat (limited to 'test/org/traccar')
-rw-r--r-- | test/org/traccar/protocol/H02ProtocolEncoderTest.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/org/traccar/protocol/H02ProtocolEncoderTest.java b/test/org/traccar/protocol/H02ProtocolEncoderTest.java index e7b409a88..e022a7b7e 100644 --- a/test/org/traccar/protocol/H02ProtocolEncoderTest.java +++ b/test/org/traccar/protocol/H02ProtocolEncoderTest.java @@ -1,16 +1,22 @@ package org.traccar.protocol; -import org.joda.time.DateTime; import org.junit.Test; import org.traccar.ProtocolTest; import org.traccar.model.Command; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.ZoneOffset; +import java.util.Date; + import static org.junit.Assert.assertEquals; public class H02ProtocolEncoderTest extends ProtocolTest { private H02ProtocolEncoder encoder = new H02ProtocolEncoder(); - private DateTime time = new DateTime().withHourOfDay(1).withMinuteOfHour(2).withSecondOfMinute(3); + private Date time = Date.from( + LocalDateTime.of(LocalDate.now(), LocalTime.of(1, 2, 3)).atZone(ZoneOffset.systemDefault()).toInstant()); @Test public void testAlarmArmEncode() throws Exception { |