aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-09-17 15:50:19 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-09-17 15:50:19 +1200
commit7e2ed343d2a6a03938c3f074417464c63d31fd59 (patch)
tree61dd514f7618ac07b56ccfd84f607e3d8b7c4b98 /test
parentda5286acb0c81f5b9bfe92eaa30e9759e3fff6b5 (diff)
downloadtrackermap-server-7e2ed343d2a6a03938c3f074417464c63d31fd59.tar.gz
trackermap-server-7e2ed343d2a6a03938c3f074417464c63d31fd59.tar.bz2
trackermap-server-7e2ed343d2a6a03938c3f074417464c63d31fd59.zip
Remove joda time library
Diffstat (limited to 'test')
-rw-r--r--test/org/traccar/protocol/H02ProtocolEncoderTest.java10
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 {