Skip to content

Commit

Permalink
Merge pull request #423 from sergeymetallic/patch-1
Browse files Browse the repository at this point in the history
Update CalendarSerializer.java
  • Loading branch information
cowtowncoder committed Mar 14, 2014
2 parents cf31515 + 9a3bf6c commit c4a1444
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ public void serialize(Calendar value, JsonGenerator jgen, SerializerProvider pro
} else if (_customFormat != null) {
// 21-Feb-2011, tatu: not optimal, but better than alternatives:
synchronized (_customFormat) {
jgen.writeString(_customFormat.format(value));
// _customformat cannot parse Calendar, so Date should be passed
jgen.writeString(_customFormat.format(value.getTime()));
}
} else {
provider.defaultSerializeDateValue(value.getTime(), jgen);
Expand Down

0 comments on commit c4a1444

Please sign in to comment.