|
|
@@ -8,6 +8,8 @@ import java.time.format.DateTimeParseException;
|
|
|
|
|
|
import static net.ranides.assira.time.DateTimeFormat.DATE;
|
|
|
import static net.ranides.assira.time.DateTimeFormat.DATETIME;
|
|
|
+import static net.ranides.assira.time.DateTimeFormat.TIME;
|
|
|
+import static net.ranides.assira.time.DateTimeZones.TV;
|
|
|
import static org.junit.Assert.assertEquals;
|
|
|
import static org.junit.Assert.assertThrows;
|
|
|
|
|
|
@@ -19,51 +21,45 @@ public class DateTimeParsersTest {
|
|
|
DATETIME.parse("2020-08-24T08:45:00");
|
|
|
});
|
|
|
|
|
|
- assertEquals("2020-08-24T08:45+02:00[Poland]", DATETIME.parse("2020-08-24T08:45:00+02:00[Poland]").toString());
|
|
|
- assertEquals("2020-08-24T08:45Z", DATETIME.parse("2020-08-24T08:45:00Z").toString());
|
|
|
- assertEquals("2020-08-24T08:45+02:00[Europe/Warsaw]", DATETIME.parse("2020-08-24T08:45:00+06:00[Europe/Warsaw]").toString());
|
|
|
- assertEquals("2020-08-24T08:45+02:00[Europe/Warsaw]", DATETIME.parse("2020-08-24T08:45:00+17:00[Europe/Warsaw]").toString());
|
|
|
- assertEquals("2020-08-24T08:45+06:00", DATETIME.parse("2020-08-24T08:45:00+06:00").toString());
|
|
|
- assertEquals("2020-08-24T08:45+17:00", DATETIME.parse("2020-08-24T08:45:00+17:00").toString());
|
|
|
+ assertEquals("2020-08-24T08:45+02:00[Poland]", DATETIME.parse("2020-08-24T08:45:00+02:00[Poland]").toString());
|
|
|
+ assertEquals("2020-08-24T08:45Z", DATETIME.parse("2020-08-24T08:45:00Z").toString());
|
|
|
+ assertEquals("2020-08-24T08:45+02:00[Europe/Warsaw]", DATETIME.parse("2020-08-24T08:45:00+06:00[Europe/Warsaw]").toString());
|
|
|
+ assertEquals("2020-08-24T08:45+02:00[Europe/Warsaw]", DATETIME.parse("2020-08-24T08:45:00+17:00[Europe/Warsaw]").toString());
|
|
|
+ assertEquals("2020-08-24T08:45+06:00", DATETIME.parse("2020-08-24T08:45:00+06:00").toString());
|
|
|
+ assertEquals("2020-08-24T08:45+17:00", DATETIME.parse("2020-08-24T08:45:00+17:00").toString());
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void testParseDateTimeSourced() {
|
|
|
- ZoneId zone = ZoneId.of("Pacific/Funafuti");
|
|
|
-
|
|
|
- assertEquals("2020-08-24T08:45+12:00[Pacific/Funafuti]", DATETIME.withSourceZone(zone).parse("2020-08-24T08:45:00").toString());
|
|
|
- assertEquals("2020-08-24T08:45+02:00[Poland]", DATETIME.withSourceZone(zone).parse("2020-08-24T08:45:00+02:00[Poland]").toString());
|
|
|
- assertEquals("2020-08-24T08:45Z", DATETIME.withSourceZone(zone).parse("2020-08-24T08:45:00Z").toString());
|
|
|
- assertEquals("2020-08-24T08:45+02:00[Europe/Warsaw]", DATETIME.withSourceZone(zone).parse("2020-08-24T08:45:00+06:00[Europe/Warsaw]").toString());
|
|
|
- assertEquals("2020-08-24T08:45+02:00[Europe/Warsaw]", DATETIME.withSourceZone(zone).parse("2020-08-24T08:45:00+17:00[Europe/Warsaw]").toString());
|
|
|
- assertEquals("2020-08-24T08:45+06:00", DATETIME.withSourceZone(zone).parse("2020-08-24T08:45:00+06:00").toString());
|
|
|
- assertEquals("2020-08-24T08:45+17:00", DATETIME.withSourceZone(zone).parse("2020-08-24T08:45:00+17:00").toString());
|
|
|
+ assertEquals("2020-08-24T08:45+12:00[Tuvalu]", DATETIME.withSourceZone(TV).parse("2020-08-24T08:45:00").toString());
|
|
|
+ assertEquals("2020-08-24T08:45+02:00[Poland]", DATETIME.withSourceZone(TV).parse("2020-08-24T08:45:00+02:00[Poland]").toString());
|
|
|
+ assertEquals("2020-08-24T08:45Z", DATETIME.withSourceZone(TV).parse("2020-08-24T08:45:00Z").toString());
|
|
|
+ assertEquals("2020-08-24T08:45+02:00[Europe/Warsaw]", DATETIME.withSourceZone(TV).parse("2020-08-24T08:45:00+06:00[Europe/Warsaw]").toString());
|
|
|
+ assertEquals("2020-08-24T08:45+02:00[Europe/Warsaw]", DATETIME.withSourceZone(TV).parse("2020-08-24T08:45:00+17:00[Europe/Warsaw]").toString());
|
|
|
+ assertEquals("2020-08-24T08:45+06:00", DATETIME.withSourceZone(TV).parse("2020-08-24T08:45:00+06:00").toString());
|
|
|
+ assertEquals("2020-08-24T08:45+17:00", DATETIME.withSourceZone(TV).parse("2020-08-24T08:45:00+17:00").toString());
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void testParseDateTimeTargeted() {
|
|
|
- ZoneId zone = ZoneId.of("Pacific/Funafuti");
|
|
|
-
|
|
|
- assertEquals("2020-08-24T08:45+12:00[Pacific/Funafuti]", DATETIME.withTargetZone(zone).parse("2020-08-24T08:45:00").toString());
|
|
|
- assertEquals("2020-08-24T18:45+12:00[Pacific/Funafuti]", DATETIME.withTargetZone(zone).parse("2020-08-24T08:45:00+02:00[Poland]").toString());
|
|
|
- assertEquals("2020-08-24T20:45+12:00[Pacific/Funafuti]", DATETIME.withTargetZone(zone).parse("2020-08-24T08:45:00Z").toString());
|
|
|
- assertEquals("2020-08-24T18:45+12:00[Pacific/Funafuti]", DATETIME.withTargetZone(zone).parse("2020-08-24T08:45:00+06:00[Europe/Warsaw]").toString());
|
|
|
- assertEquals("2020-08-24T18:45+12:00[Pacific/Funafuti]", DATETIME.withTargetZone(zone).parse("2020-08-24T08:45:00+17:00[Europe/Warsaw]").toString());
|
|
|
- assertEquals("2020-08-24T14:45+12:00[Pacific/Funafuti]", DATETIME.withTargetZone(zone).parse("2020-08-24T08:45:00+06:00").toString());
|
|
|
- assertEquals("2020-08-24T03:45+12:00[Pacific/Funafuti]", DATETIME.withTargetZone(zone).parse("2020-08-24T08:45:00+17:00").toString());
|
|
|
+ assertEquals("2020-08-24T08:45+12:00[Tuvalu]", DATETIME.withTargetZone(TV).parse("2020-08-24T08:45:00").toString());
|
|
|
+ assertEquals("2020-08-24T18:45+12:00[Tuvalu]", DATETIME.withTargetZone(TV).parse("2020-08-24T08:45:00+02:00[Poland]").toString());
|
|
|
+ assertEquals("2020-08-24T20:45+12:00[Tuvalu]", DATETIME.withTargetZone(TV).parse("2020-08-24T08:45:00Z").toString());
|
|
|
+ assertEquals("2020-08-24T18:45+12:00[Tuvalu]", DATETIME.withTargetZone(TV).parse("2020-08-24T08:45:00+06:00[Europe/Warsaw]").toString());
|
|
|
+ assertEquals("2020-08-24T18:45+12:00[Tuvalu]", DATETIME.withTargetZone(TV).parse("2020-08-24T08:45:00+17:00[Europe/Warsaw]").toString());
|
|
|
+ assertEquals("2020-08-24T14:45+12:00[Tuvalu]", DATETIME.withTargetZone(TV).parse("2020-08-24T08:45:00+06:00").toString());
|
|
|
+ assertEquals("2020-08-24T03:45+12:00[Tuvalu]", DATETIME.withTargetZone(TV).parse("2020-08-24T08:45:00+17:00").toString());
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void testParseDateTimeZoned() {
|
|
|
- ZoneId zone = ZoneId.of("Pacific/Funafuti");
|
|
|
-
|
|
|
- assertEquals("2020-08-24T08:45+12:00[Pacific/Funafuti]", DATETIME.withZone(zone).parse("2020-08-24T08:45:00").toString());
|
|
|
- assertEquals("2020-08-24T18:45+12:00[Pacific/Funafuti]", DATETIME.withZone(zone).parse("2020-08-24T08:45:00+02:00[Poland]").toString());
|
|
|
- assertEquals("2020-08-24T20:45+12:00[Pacific/Funafuti]", DATETIME.withZone(zone).parse("2020-08-24T08:45:00Z").toString());
|
|
|
- assertEquals("2020-08-24T18:45+12:00[Pacific/Funafuti]", DATETIME.withZone(zone).parse("2020-08-24T08:45:00+06:00[Europe/Warsaw]").toString());
|
|
|
- assertEquals("2020-08-24T18:45+12:00[Pacific/Funafuti]", DATETIME.withZone(zone).parse("2020-08-24T08:45:00+17:00[Europe/Warsaw]").toString());
|
|
|
- assertEquals("2020-08-24T14:45+12:00[Pacific/Funafuti]", DATETIME.withZone(zone).parse("2020-08-24T08:45:00+06:00").toString());
|
|
|
- assertEquals("2020-08-24T03:45+12:00[Pacific/Funafuti]", DATETIME.withZone(zone).parse("2020-08-24T08:45:00+17:00").toString());
|
|
|
+ assertEquals("2020-08-24T08:45+12:00[Tuvalu]", DATETIME.withZone(TV).parse("2020-08-24T08:45:00").toString());
|
|
|
+ assertEquals("2020-08-24T18:45+12:00[Tuvalu]", DATETIME.withZone(TV).parse("2020-08-24T08:45:00+02:00[Poland]").toString());
|
|
|
+ assertEquals("2020-08-24T20:45+12:00[Tuvalu]", DATETIME.withZone(TV).parse("2020-08-24T08:45:00Z").toString());
|
|
|
+ assertEquals("2020-08-24T18:45+12:00[Tuvalu]", DATETIME.withZone(TV).parse("2020-08-24T08:45:00+06:00[Europe/Warsaw]").toString());
|
|
|
+ assertEquals("2020-08-24T18:45+12:00[Tuvalu]", DATETIME.withZone(TV).parse("2020-08-24T08:45:00+17:00[Europe/Warsaw]").toString());
|
|
|
+ assertEquals("2020-08-24T14:45+12:00[Tuvalu]", DATETIME.withZone(TV).parse("2020-08-24T08:45:00+06:00").toString());
|
|
|
+ assertEquals("2020-08-24T03:45+12:00[Tuvalu]", DATETIME.withZone(TV).parse("2020-08-24T08:45:00+17:00").toString());
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
@@ -72,7 +68,7 @@ public class DateTimeParsersTest {
|
|
|
DATE.parseDate("2024-10-16");
|
|
|
});
|
|
|
assertEquals("2020-08-16 [Poland]", DATE.parseDate("2020-08-16T20:45:00+02:00[Poland]").toString());
|
|
|
- assertEquals("2020-08-16 [Z]", DATE.parseDate("2020-08-16T20:45:00Z").toString());
|
|
|
+ assertEquals("2020-08-16 [Z]", DATE.parseDate("2020-08-16T20:45:00Z").toString());
|
|
|
assertEquals("2020-08-16 [+06:00]", DATE.parseDate("2020-08-16T20:45:00+06:00").toString());
|
|
|
assertEquals("2020-08-16 [+18:00]", DATE.parseDate("2020-08-16T20:45:00+18:00").toString());
|
|
|
assertThrows(DateTimeParseException.class, () -> {
|
|
|
@@ -84,87 +80,78 @@ public class DateTimeParsersTest {
|
|
|
|
|
|
@Test
|
|
|
public void testParseDateSourced() {
|
|
|
- ZoneId zone = ZoneId.of("Pacific/Funafuti");
|
|
|
-
|
|
|
- assertEquals("2024-10-16 [Pacific/Funafuti]", DATE.withSourceZone(zone).parseDate("2024-10-16").toString());
|
|
|
- assertEquals("2020-08-16 [Poland]", DATE.withSourceZone(zone).parseDate("2020-08-16T20:45:00+02:00[Poland]").toString());
|
|
|
- assertEquals("2020-08-16 [Z]", DATE.withSourceZone(zone).parseDate("2020-08-16T20:45:00Z").toString());
|
|
|
- assertEquals("2020-08-16 [+06:00]", DATE.withSourceZone(zone).parseDate("2020-08-16T20:45:00+06:00").toString());
|
|
|
- assertEquals("2020-08-16 [+18:00]", DATE.withSourceZone(zone).parseDate("2020-08-16T20:45:00+18:00").toString());
|
|
|
- assertEquals("2020-08-16 [Pacific/Funafuti]", DATE.withSourceZone(zone).parseDate("2020-08-16T20:45:00").toString());
|
|
|
- assertEquals("2020-08-16 [Poland]", DATE.withSourceZone(zone).parseDate("2020-08-16+02:00[Poland]").toString());
|
|
|
- assertEquals("2020-08-16 [+07:00]", DATE.withSourceZone(zone).parseDate("2020-08-16+07:00").toString());
|
|
|
+ assertEquals("2024-10-16 [Tuvalu]", DATE.withSourceZone(TV).parseDate("2024-10-16").toString());
|
|
|
+ assertEquals("2020-08-16 [Poland]", DATE.withSourceZone(TV).parseDate("2020-08-16T20:45:00+02:00[Poland]").toString());
|
|
|
+ assertEquals("2020-08-16 [Z]", DATE.withSourceZone(TV).parseDate("2020-08-16T20:45:00Z").toString());
|
|
|
+ assertEquals("2020-08-16 [+06:00]", DATE.withSourceZone(TV).parseDate("2020-08-16T20:45:00+06:00").toString());
|
|
|
+ assertEquals("2020-08-16 [+18:00]", DATE.withSourceZone(TV).parseDate("2020-08-16T20:45:00+18:00").toString());
|
|
|
+ assertEquals("2020-08-16 [Tuvalu]", DATE.withSourceZone(TV).parseDate("2020-08-16T20:45:00").toString());
|
|
|
+ assertEquals("2020-08-16 [Poland]", DATE.withSourceZone(TV).parseDate("2020-08-16+02:00[Poland]").toString());
|
|
|
+ assertEquals("2020-08-16 [+07:00]", DATE.withSourceZone(TV).parseDate("2020-08-16+07:00").toString());
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void testParseDateTargeted() {
|
|
|
- ZoneId zone = ZoneId.of("Pacific/Funafuti");
|
|
|
-
|
|
|
- assertEquals("2024-10-16 [Pacific/Funafuti]", DATE.withTargetZone(zone).parseDate("2024-10-16").toString());
|
|
|
- assertEquals("2020-08-17 [Pacific/Funafuti]", DATE.withTargetZone(zone).parseDate("2020-08-16T20:45:00+02:00[Poland]").toString());
|
|
|
- assertEquals("2020-08-17 [Pacific/Funafuti]", DATE.withTargetZone(zone).parseDate("2020-08-16T20:45:00Z").toString());
|
|
|
- assertEquals("2020-08-17 [Pacific/Funafuti]", DATE.withTargetZone(zone).parseDate("2020-08-16T20:45:00+06:00").toString());
|
|
|
- assertEquals("2020-08-16 [Pacific/Funafuti]", DATE.withTargetZone(zone).parseDate("2020-08-16T20:45:00+18:00").toString());
|
|
|
- assertEquals("2020-08-16 [Pacific/Funafuti]", DATE.withTargetZone(zone).parseDate("2020-08-16T20:45:00").toString());
|
|
|
+ assertEquals("2024-10-16 [Tuvalu]", DATE.withTargetZone(TV).parseDate("2024-10-16").toString());
|
|
|
+ assertEquals("2020-08-17 [Tuvalu]", DATE.withTargetZone(TV).parseDate("2020-08-16T20:45:00+02:00[Poland]").toString());
|
|
|
+ assertEquals("2020-08-17 [Tuvalu]", DATE.withTargetZone(TV).parseDate("2020-08-16T20:45:00Z").toString());
|
|
|
+ assertEquals("2020-08-17 [Tuvalu]", DATE.withTargetZone(TV).parseDate("2020-08-16T20:45:00+06:00").toString());
|
|
|
+ assertEquals("2020-08-16 [Tuvalu]", DATE.withTargetZone(TV).parseDate("2020-08-16T20:45:00+18:00").toString());
|
|
|
+ assertEquals("2020-08-16 [Tuvalu]", DATE.withTargetZone(TV).parseDate("2020-08-16T20:45:00").toString());
|
|
|
|
|
|
assertThrows(DateTimeParseException.class, () -> {
|
|
|
- DATE.withTargetZone(zone).parseDate("2020-08-16+02:00[Poland]");
|
|
|
+ DATE.withTargetZone(TV).parseDate("2020-08-16+02:00[Poland]");
|
|
|
});
|
|
|
|
|
|
assertThrows(DateTimeParseException.class, () -> {
|
|
|
- DATE.withTargetZone(zone).parseDate("2020-08-16+07:00");
|
|
|
+ DATE.withTargetZone(TV).parseDate("2020-08-16+07:00");
|
|
|
});
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void testParseTimeDefault() {
|
|
|
-
|
|
|
assertThrows(DateTimeParseException.class, () -> {
|
|
|
- DateTimeFormat.TIME.parseTime("10:45");
|
|
|
+ TIME.parseTime("10:45");
|
|
|
});
|
|
|
assertThrows(DateTimeParseException.class, () -> {
|
|
|
- DateTimeFormat.TIME.parseTime("2020-08-16T20:45:00");
|
|
|
+ TIME.parseTime("2020-08-16T20:45:00");
|
|
|
});
|
|
|
|
|
|
- assertEquals("20:45 [Poland]", DateTimeFormat.TIME.parseTime("2020-08-16T20:45:00+02:00[Poland]").toString());
|
|
|
- assertEquals("20:45 [Z]", DateTimeFormat.TIME.parseTime("2020-08-16T20:45:00Z").toString());
|
|
|
- assertEquals("20:45 [+06:00]", DateTimeFormat.TIME.parseTime("2020-08-16T20:45:00+06:00").toString());
|
|
|
- assertEquals("20:45 [+18:00]", DateTimeFormat.TIME.parseTime("2020-08-16T20:45:00+18:00").toString());
|
|
|
- assertEquals("20:45 [+06:00]", DateTimeFormat.TIME.parseTime("20:45:00+06:00").toString());
|
|
|
- assertEquals("20:45 [Europe/Astrakhan]", DateTimeFormat.TIME.parseTime("20:45:00+04:00[Europe/Astrakhan]").toString());
|
|
|
+ assertEquals("20:45 [Poland]", TIME.parseTime("2020-08-16T20:45:00+02:00[Poland]").toString());
|
|
|
+ assertEquals("20:45 [Z]", TIME.parseTime("2020-08-16T20:45:00Z").toString());
|
|
|
+ assertEquals("20:45 [+06:00]", TIME.parseTime("2020-08-16T20:45:00+06:00").toString());
|
|
|
+ assertEquals("20:45 [+18:00]", TIME.parseTime("2020-08-16T20:45:00+18:00").toString());
|
|
|
+ assertEquals("20:45 [+06:00]", TIME.parseTime("20:45:00+06:00").toString());
|
|
|
+ assertEquals("20:45 [Europe/Astrakhan]", TIME.parseTime("20:45:00+04:00[Europe/Astrakhan]").toString());
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void testParseTimeSourced() {
|
|
|
- ZoneId zone = ZoneId.of("Pacific/Funafuti");
|
|
|
-
|
|
|
- assertEquals("10:45 [Pacific/Funafuti]", DateTimeFormat.TIME.withSourceZone(zone).parseTime("10:45").toString());
|
|
|
- assertEquals("20:45 [Pacific/Funafuti]", DateTimeFormat.TIME.withSourceZone(zone).parseTime("2020-08-16T20:45:00").toString());
|
|
|
- assertEquals("20:45 [Poland]", DateTimeFormat.TIME.withSourceZone(zone).parseTime("2020-08-16T20:45:00+02:00[Poland]").toString());
|
|
|
- assertEquals("20:45 [Z]", DateTimeFormat.TIME.withSourceZone(zone).parseTime("2020-08-16T20:45:00Z").toString());
|
|
|
- assertEquals("20:45 [+06:00]", DateTimeFormat.TIME.withSourceZone(zone).parseTime("2020-08-16T20:45:00+06:00").toString());
|
|
|
- assertEquals("20:45 [+18:00]", DateTimeFormat.TIME.withSourceZone(zone).parseTime("2020-08-16T20:45:00+18:00").toString());
|
|
|
- assertEquals("20:45 [+06:00]", DateTimeFormat.TIME.withSourceZone(zone).parseTime("20:45:00+06:00").toString());
|
|
|
- assertEquals("20:45 [Europe/Astrakhan]", DateTimeFormat.TIME.withSourceZone(zone).parseTime("20:45:00+04:00[Europe/Astrakhan]").toString());
|
|
|
+ assertEquals("10:45 [Tuvalu]", TIME.withSourceZone(TV).parseTime("10:45").toString());
|
|
|
+ assertEquals("20:45 [Tuvalu]", TIME.withSourceZone(TV).parseTime("2020-08-16T20:45:00").toString());
|
|
|
+ assertEquals("20:45 [Poland]", TIME.withSourceZone(TV).parseTime("2020-08-16T20:45:00+02:00[Poland]").toString());
|
|
|
+ assertEquals("20:45 [Z]", TIME.withSourceZone(TV).parseTime("2020-08-16T20:45:00Z").toString());
|
|
|
+ assertEquals("20:45 [+06:00]", TIME.withSourceZone(TV).parseTime("2020-08-16T20:45:00+06:00").toString());
|
|
|
+ assertEquals("20:45 [+18:00]", TIME.withSourceZone(TV).parseTime("2020-08-16T20:45:00+18:00").toString());
|
|
|
+ assertEquals("20:45 [+06:00]", TIME.withSourceZone(TV).parseTime("20:45:00+06:00").toString());
|
|
|
+ assertEquals("20:45 [Europe/Astrakhan]", TIME.withSourceZone(TV).parseTime("20:45:00+04:00[Europe/Astrakhan]").toString());
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
public void testParseTimeTargeted() {
|
|
|
- ZoneId zone = ZoneId.of("Pacific/Funafuti");
|
|
|
-
|
|
|
assertThrows(DateTimeParseException.class, () -> {
|
|
|
- DateTimeFormat.TIME.withTargetZone(zone).parseTime("20:45:00+06:00");
|
|
|
+ TIME.withTargetZone(TV).parseTime("20:45:00+06:00");
|
|
|
});
|
|
|
assertThrows(DateTimeParseException.class, () -> {
|
|
|
- DateTimeFormat.TIME.withTargetZone(zone).parseTime("20:45:00+04:00[Europe/Astrakhan]");
|
|
|
+ TIME.withTargetZone(TV).parseTime("20:45:00+04:00[Europe/Astrakhan]");
|
|
|
});
|
|
|
|
|
|
- assertEquals("10:45 [Pacific/Funafuti]", DateTimeFormat.TIME.withTargetZone(zone).parseTime("10:45").toString());
|
|
|
- assertEquals("06:45 [Pacific/Funafuti]", DateTimeFormat.TIME.withTargetZone(zone).parseTime("2020-08-16T20:45:00+02:00[Poland]").toString());
|
|
|
- assertEquals("08:45 [Pacific/Funafuti]", DateTimeFormat.TIME.withTargetZone(zone).parseTime("2020-08-16T20:45:00Z").toString());
|
|
|
- assertEquals("02:45 [Pacific/Funafuti]", DateTimeFormat.TIME.withTargetZone(zone).parseTime("2020-08-16T20:45:00+06:00").toString());
|
|
|
- assertEquals("14:45 [Pacific/Funafuti]", DateTimeFormat.TIME.withTargetZone(zone).parseTime("2020-08-16T20:45:00+18:00").toString());
|
|
|
- assertEquals("20:45 [Pacific/Funafuti]", DateTimeFormat.TIME.withTargetZone(zone).parseTime("2020-08-16T20:45:00").toString());
|
|
|
+ assertEquals("10:45 [Tuvalu]", TIME.withTargetZone(TV).parseTime("10:45").toString());
|
|
|
+ assertEquals("06:45 [Tuvalu]", TIME.withTargetZone(TV).parseTime("2020-08-16T20:45:00+02:00[Poland]").toString());
|
|
|
+ assertEquals("08:45 [Tuvalu]", TIME.withTargetZone(TV).parseTime("2020-08-16T20:45:00Z").toString());
|
|
|
+ assertEquals("02:45 [Tuvalu]", TIME.withTargetZone(TV).parseTime("2020-08-16T20:45:00+06:00").toString());
|
|
|
+ assertEquals("14:45 [Tuvalu]", TIME.withTargetZone(TV).parseTime("2020-08-16T20:45:00+18:00").toString());
|
|
|
+ assertEquals("20:45 [Tuvalu]", TIME.withTargetZone(TV).parseTime("2020-08-16T20:45:00").toString());
|
|
|
}
|
|
|
|
|
|
}
|