Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] Re: [Geoserver-devel] We're generating invalid dates in GML....

Gertjan van Oosten ha scritto:

I guess we should make this configurable.

That would suit me just fine.  Alternate timezone specifications would
also be OK:

  "This representation may be immediately followed by a "Z" to indicate
   Coordinated Universal Time (UTC) or, to indicate the time zone, i.e.
   the difference between the local time and Coordinated Universal Time,
   immediately followed by a sign, + or -, followed by the difference
   from UTC represented as hh:mm (note: the minutes part is required)."

Ideally the time would always be uniquely represented (i.e. *with* a
timezone given) to avoid errors in timezone assumptions.  I may be
looking at a feature with a timestamp served from a server somewhere on
the Internet without knowing the local timezone of that server (it may
not even be possible to know that, the server could be misconfigured).
I really, really should be able to rely on the timestamp alone.


I see. I'll have to change the way our code behaves to make it publish
the proper offset, since now there is just an option to add a "Z" at
the end of the string, but it does not really converts the date
to the UTC timezone.

Hum, I don't have time to work on this now, but I've opened an issue:
http://jira.codehaus.org/browse/GEOT-1193

If you feel like providing a patch, DateUtil is here:
http://svn.geotools.org/geotools/trunk/gt/modules/library/main/src/main/java/org/geotools/feature/type/DateUtil.java

and the relevant methods are serializeDateTime and parseDateTime (and
probably serializeTime, serializeSqlTime, and parseTime too)

Cheers
Andrea





Back to the top