Convert dates to ISO 8601 for reconciliation. Fixes #688.

This commit is contained in:
Tom Morris 2013-05-26 10:08:55 -04:00
parent 7615db97cf
commit 4a5d3d4662

View File

@ -40,6 +40,8 @@ import java.io.StringWriter;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
@ -250,6 +252,10 @@ public class StandardReconConfig extends ReconConfig {
jsonWriter.key("id"); jsonWriter.value(cell2.recon.match.id); jsonWriter.key("id"); jsonWriter.value(cell2.recon.match.id);
jsonWriter.key("name"); jsonWriter.value(cell2.recon.match.name); jsonWriter.key("name"); jsonWriter.value(cell2.recon.match.name);
jsonWriter.endObject(); jsonWriter.endObject();
} else if (cell2.value instanceof Calendar) {
jsonWriter.value(ParsingUtilities.dateToString(((Calendar) cell2.value).getTime()));
} else if (cell2.value instanceof Date) {
jsonWriter.value(ParsingUtilities.dateToString((Date) cell2.value));
} else { } else {
jsonWriter.value(cell2.value.toString()); jsonWriter.value(cell2.value.toString());
} }