In reviewing #116 <https://github.com/geotools/geotools/pull/1116> (and the
"Proposal to avoid Date-shifting due to Timezones" email thread) I was
reminded of a rejected pull request (#997
<https://github.com/geotools/geotools/pull/997>) from Travis that was put
together for the GeoNode project.
Checking in with the GeoNode team - they are still running a fork of
GeoTools due to this issue.
To provide some examples of the differences:
XMLConvertFactory default is to use timezones:
calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
calendar.clear();
calendar.setTimeInMillis(date.getTime());
textValue = converter.printDate(cal);
#116 allows a -Dorg.geotools.localDateTimeHandling=true to modify
XMLConvertFactory behaviour:
calendar = Calendar.getInstance();
calendar.clear();
calendar.setTimeInMillis(date.getTime());
textValue = converter.printDate(cal);
GeoNode requires negative dates, produced using the following snippet
from FilterToSQL.java:
out.write("'" + date);
if (date.getTime() < -62135769600000L) {
out.write(" BC");
}
If anyone has capacity, it may be worth addressing these two issues a bit
more consistently (say DateUtil class which provides consistent/configured
Calendar, Date, String methods.)
--
Jody Garnett
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel