Hi,
would be nice to have a central component to handle that.
I can imagine that the "local time handling" will require more tweaks to
get complete, too.
I will keep the idea in mind for the next change.
BTW: I think the GT have their own internal date representation (for such
"BC" cases). Right?
Best regards,
Andreas
2016-02-18 21:17 GMT+01:00 Jody Garnett <jody.garn...@gmail.com>:
> 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
>
--
Andreas Watermeyer
office: +49 (0)221 820 07 14
----------------------------------------------------------------
ITS Telco Services GmbH
GIS Services & Solutions
Telecommunications Division
Dillenburger Str. 77
D-51105 Köln
Tel.: +49 (0)221 820 07 00
Fax : +49 (0)221 820 07 22
Mail: i...@its-telco.de
Web : http://www.its-telco.de
----------------------------------------------------------------
Sitz der Gesellschaft: Köln
Amtsgericht Köln, HRB 59310
Geschäftsführer: Gunnar Haack, Ralf Petersilka, Michael Schnepf, Kai
Schriewer, Ludger Schulte
----------------------------------------------------------------
Diese E-Mail enthält vertrauliche Informationen. Wenn Sie nicht der
richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist
nicht gestattet.
This e-mail may contain confidential information. If you are not the
intended recipient (or have received this e-mail in error) please notify
the sender immediately and destroy this e-mail. Any unauthorised copying,
disclosure or distribution of the material in this e-mail is strictly
forbidden.
------------------------------------------------------------------------------
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