@Test public void testSimpleDateFormatter() throws Exception{ String dateToParse = "2011/03/31 21:12:57 +0000"; Date date = deserializer.createDateFormatter().parse(dateToParse); assertThat(date, notNullValue()); System.out.println(date); Calendar cal = Calendar.getInstance(new SimpleTimeZone(0,"GMT")); cal.setTimeInMillis(date.getTime()); assertThat(cal.get(Calendar.DAY_OF_MONTH), equalTo(31)); assertThat(cal.get(Calendar.MONTH), equalTo(Calendar.MARCH)); assertThat(cal.get(Calendar.HOUR_OF_DAY), equalTo(21)); assertThat(cal.get(Calendar.ZONE_OFFSET), equalTo(0)); }
SimpleDateFormat createDateFormatter(){ return new SimpleDateFormat(DATE_FORMAT_MASK, LOCALE); }
YammerDateDeserializer extends JsonDeserializer<Date> { SimpleDateFormat createDateFormatter(){ return new SimpleDateFormat(DATE_FORMAT_MASK, LOCALE); } }
YammerDateDeserializer extends JsonDeserializer<Date> { SimpleDateFormat createDateFormatter(){ return new SimpleDateFormat(DATE_FORMAT_MASK, LOCALE); }  }
YammerDateDeserializer extends JsonDeserializer<Date> { SimpleDateFormat createDateFormatter(){ return new SimpleDateFormat(DATE_FORMAT_MASK, LOCALE); }  @Override Date deserialize(JsonParser jp, DeserializationContext ctxt); }
YammerDateDeserializer extends JsonDeserializer<Date> { SimpleDateFormat createDateFormatter(){ return new SimpleDateFormat(DATE_FORMAT_MASK, LOCALE); }  @Override Date deserialize(JsonParser jp, DeserializationContext ctxt); static final String DATE_FORMAT_MASK; static final Locale LOCALE; }