@Test(expected = IllegalArgumentException.class) public void testParseFromBlank() { PARSER.parse(""); }
@Override public ZonedDateTime parse(final String... columns) { checkNotNull(columns, "No columns to parse from"); checkArgument(columns.length == 1, String.format("Expecting only one column, but got %d", columns.length)); final String time = columns[0]; checkArgument(!isNullOrEmpty(time), "Missing time info to parse from"); LocalDateTime localDateTime = LocalDateTime.parse(time, DateTimeFormatter.ofPattern(pattern, Locale.ENGLISH)); return ZonedDateTime.of(localDateTime, ZoneId.of("America/Los_Angeles")); }
DefaultPacificDateTimeParser implements SingleLineValueParser<ZonedDateTime> { @Override public ZonedDateTime parse(final String... columns) { checkNotNull(columns, "No columns to parse from"); checkArgument(columns.length == 1, String.format("Expecting only one column, but got %d", columns.length)); final String time = columns[0]; checkArgument(!isNullOrEmpty(time), "Missing time info to parse from"); LocalDateTime localDateTime = LocalDateTime.parse(time, DateTimeFormatter.ofPattern(pattern, Locale.ENGLISH)); return ZonedDateTime.of(localDateTime, ZoneId.of("America/Los_Angeles")); } }
DefaultPacificDateTimeParser implements SingleLineValueParser<ZonedDateTime> { @Override public ZonedDateTime parse(final String... columns) { checkNotNull(columns, "No columns to parse from"); checkArgument(columns.length == 1, String.format("Expecting only one column, but got %d", columns.length)); final String time = columns[0]; checkArgument(!isNullOrEmpty(time), "Missing time info to parse from"); LocalDateTime localDateTime = LocalDateTime.parse(time, DateTimeFormatter.ofPattern(pattern, Locale.ENGLISH)); return ZonedDateTime.of(localDateTime, ZoneId.of("America/Los_Angeles")); } DefaultPacificDateTimeParser(final String pattern); }
DefaultPacificDateTimeParser implements SingleLineValueParser<ZonedDateTime> { @Override public ZonedDateTime parse(final String... columns) { checkNotNull(columns, "No columns to parse from"); checkArgument(columns.length == 1, String.format("Expecting only one column, but got %d", columns.length)); final String time = columns[0]; checkArgument(!isNullOrEmpty(time), "Missing time info to parse from"); LocalDateTime localDateTime = LocalDateTime.parse(time, DateTimeFormatter.ofPattern(pattern, Locale.ENGLISH)); return ZonedDateTime.of(localDateTime, ZoneId.of("America/Los_Angeles")); } DefaultPacificDateTimeParser(final String pattern); @Override ZonedDateTime parse(final String... columns); }
DefaultPacificDateTimeParser implements SingleLineValueParser<ZonedDateTime> { @Override public ZonedDateTime parse(final String... columns) { checkNotNull(columns, "No columns to parse from"); checkArgument(columns.length == 1, String.format("Expecting only one column, but got %d", columns.length)); final String time = columns[0]; checkArgument(!isNullOrEmpty(time), "Missing time info to parse from"); LocalDateTime localDateTime = LocalDateTime.parse(time, DateTimeFormatter.ofPattern(pattern, Locale.ENGLISH)); return ZonedDateTime.of(localDateTime, ZoneId.of("America/Los_Angeles")); } DefaultPacificDateTimeParser(final String pattern); @Override ZonedDateTime parse(final String... columns);  }