@Test public void testCustomTimeFormatterWithDefaultZone() { EcLogYamlConfig config = new EcLogYamlConfig(); config.time_format = TIME_FORMAT; Optional<DateTimeFormatter> timeFormatter = config.getTimeFormatter(); assertThat(timeFormatter).map(DateTimeFormatter::getZone).contains(ZoneId.systemDefault()); }
public Optional<DateTimeFormatter> getTimeFormatter() { return Optional.ofNullable(time_format) .map(EcLogYamlConfig::createTimeFormatter) .map(formatter -> formatter.withZone(resolveZoneId(time_zone))); }
EcLogYamlConfig { public Optional<DateTimeFormatter> getTimeFormatter() { return Optional.ofNullable(time_format) .map(EcLogYamlConfig::createTimeFormatter) .map(formatter -> formatter.withZone(resolveZoneId(time_zone))); } }
EcLogYamlConfig { public Optional<DateTimeFormatter> getTimeFormatter() { return Optional.ofNullable(time_format) .map(EcLogYamlConfig::createTimeFormatter) .map(formatter -> formatter.withZone(resolveZoneId(time_zone))); }  }
EcLogYamlConfig { public Optional<DateTimeFormatter> getTimeFormatter() { return Optional.ofNullable(time_format) .map(EcLogYamlConfig::createTimeFormatter) .map(formatter -> formatter.withZone(resolveZoneId(time_zone))); }  String getLogFormat(); Optional<DateTimeFormatter> getTimeFormatter(); }
EcLogYamlConfig { public Optional<DateTimeFormatter> getTimeFormatter() { return Optional.ofNullable(time_format) .map(EcLogYamlConfig::createTimeFormatter) .map(formatter -> formatter.withZone(resolveZoneId(time_zone))); }  String getLogFormat(); Optional<DateTimeFormatter> getTimeFormatter(); public String log_format; public String time_format; public String time_zone; }