@Override
    @Nullable
    public Object convert(@Nullable String value) {
        if (isNullOrEmpty(value)) {
            return null;
        }

        LOG.debug("Trying to parse date <{}> with pattern <{}>, locale <{}>, and timezone <{}>.", value, dateFormat, locale, timeZone);
        final DateTimeFormatter formatter;
        if (containsTimeZone) {
            formatter = DateTimeFormat
                    .forPattern(dateFormat)
                    .withDefaultYear(YearMonth.now(timeZone).getYear())
                    .withLocale(locale);
        } else {
            formatter = DateTimeFormat
                    .forPattern(dateFormat)
                    .withDefaultYear(YearMonth.now(timeZone).getYear())
                    .withLocale(locale)
                    .withZone(timeZone);
        }

        return DateTime.parse(value, formatter);
    }
@Test
    public void issue2648() throws Exception {
        final Converter utc = new DateConverter(config("YYYY-MM-dd HH:mm:ss", "UTC", null));
        final DateTime utcDate = (DateTime) utc.convert("2016-08-10 12:00:00");
        assertThat(utcDate).isEqualTo("2016-08-10T12:00:00.000Z");

        final Converter cet = new DateConverter(config("YYYY-MM-dd HH:mm:ss", "CET", null));
        final DateTime cetDate = (DateTime) cet.convert("2016-08-10 12:00:00");
        assertThat(cetDate).isEqualTo(new DateTime("2016-08-10T12:00:00.000", DateTimeZone.forID("CET")));

        final Converter berlin = new DateConverter(config("YYYY-MM-dd HH:mm:ss", "Europe/Berlin", null));
        final DateTime berlinDate = (DateTime) berlin.convert("2016-08-10 12:00:00");
        assertThat(berlinDate).isEqualTo(new DateTime("2016-08-10T12:00:00.000", DateTimeZone.forID("Europe/Berlin")));
    }