|
|
|
@ -29,7 +29,6 @@ import org.thingsboard.common.util.JacksonUtil; |
|
|
|
|
|
|
|
import java.time.DateTimeException; |
|
|
|
import java.time.ZoneId; |
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Locale; |
|
|
|
@ -40,6 +39,7 @@ import java.util.concurrent.TimeUnit; |
|
|
|
import java.util.concurrent.TimeoutException; |
|
|
|
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat; |
|
|
|
import static org.junit.Assert.assertNotNull; |
|
|
|
import static org.junit.Assert.assertThrows; |
|
|
|
import static org.junit.Assert.assertTrue; |
|
|
|
|
|
|
|
@ -484,6 +484,12 @@ class TbDateTest { |
|
|
|
Assert.assertEquals(expected, d.toLocaleString()); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
public void TestNow() { |
|
|
|
assertTrue(TbDate.now() > 0); |
|
|
|
assertNotNull(TbDate.nowToString()); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
public void TestToUTC() { |
|
|
|
Assert.assertEquals(-2209075200000L, TbDate.UTC(0)); |
|
|
|
|