@Override
    @Nullable
    public Object convert(String value) {
        if (value == null || value.isEmpty()) {
            return null;
        }

        final Parser parser = new Parser(timeZone.toTimeZone());
        final List<DateGroup> r = parser.parse(value);

        if (r.isEmpty() || r.get(0).getDates().isEmpty()) {
            return null;
        }

        return new DateTime(r.get(0).getDates().get(0), timeZone);
    }
@Test
    public void convertObeysTimeZone() throws Exception {
        Converter c = new FlexibleDateConverter(ImmutableMap.<String, Object>of("time_zone", "+12:00"));

        final DateTime dateOnly = (DateTime) c.convert("2014-3-12");
        assertThat(dateOnly.getZone()).isEqualTo(DateTimeZone.forOffsetHours(12));
        Assertions.assertThat(dateOnly)
                .isAfterOrEqualTo(new DateTime(2014, 3, 12, 0, 0, DateTimeZone.forOffsetHours(12)))
                .isBefore(new DateTime(2014, 3, 13, 0, 0, DateTimeZone.forOffsetHours(12)));

        final DateTime dateTime = (DateTime) c.convert("2014-3-12 12:34");
        assertThat(dateTime.getZone()).isEqualTo(DateTimeZone.forOffsetHours(12));
        Assertions.assertThat(dateTime)
                .isEqualTo(new DateTime(2014, 3, 12, 12, 34, DateTimeZone.forOffsetHours(12)));

        final DateTime textualDateTime = (DateTime) c.convert("Mar 12, 2014 2pm");
        assertThat(textualDateTime.getZone()).isEqualTo(DateTimeZone.forOffsetHours(12));
        Assertions.assertThat(textualDateTime)
                .isEqualTo(new DateTime(2014, 3, 12, 14, 0, DateTimeZone.forOffsetHours(12)));
    }