[Geoserver-users] Datetime in GetFeatureInfo

Hello,

I've created an Oracle store over GeoServer 2.7.2 and now I'm trying to
retrieve features data (datetime field included) through WFS'
GetFeatureInfo.

Example from date in Oracle, formatted with /to_char(MYDATE, 'HH24:MI:SS
DD-MON-RRRR')/:
10:07:28 30-DEZ-2016

The problem is that when I click the feature in GeoServer's layer preview
(GeoJSON), it shows "2016-12-30Z" and OpenLayers is even worse, showing
"12/29/16 10:00 PM".

Any ideas on how to solve this issue? I would like to consume GetFeatureInfo
in my application and obtain the datetime as Oracle stores it.

Thanks in advance!

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Datetime-in-GetFeatureInfo-tp5301657.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi,
GeoServer 2.7.x is not supported anymore, you should try at least GeoServer 2.9.3 or
better GeoServer 2.10.1.

That said, there are known issues with Oracle and date fields, your problem seems similar to this one:
http://osgeo-org.1560.x6.nabble.com/Mapping-DATE-to-java-sql-Timestamp-in-OracleDialect-gt-jdbc-oracle-td5294871.html#a5295089

As far as I know it has not been fixed already, we did not receive a proper pull request to fix it,
nor anyone stepped up to sponsor a fix (the likeliness that someone will fix an issue relating
to a proprietary database in their spare time is admittedly quite low).

If you can provide a fix see the GeoTools thread, it should give you the right bearings, if you
are interested in sponsoring a fix instead you can check http://geoserver.org/support/

Cheers
Andrea

···

On Fri, Dec 30, 2016 at 8:28 PM, carrbrpoa <carrbrpoa@anonymised.com> wrote:

Hello,

I’ve created an Oracle store over GeoServer 2.7.2 and now I’m trying to
retrieve features data (datetime field included) through WFS’
GetFeatureInfo.

Example from date in Oracle, formatted with /to_char(MYDATE, ‘HH24:MI:SS
DD-MON-RRRR’)/:
10:07:28 30-DEZ-2016

The problem is that when I click the feature in GeoServer’s layer preview
(GeoJSON), it shows “2016-12-30Z” and OpenLayers is even worse, showing
“12/29/16 10:00 PM”.

Any ideas on how to solve this issue? I would like to consume GetFeatureInfo
in my application and obtain the datetime as Oracle stores it.

Thanks in advance!


View this message in context: http://osgeo-org.1560.x6.nabble.com/Datetime-in-GetFeatureInfo-tp5301657.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


Check out the vibrant tech community on one of the world’s most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


Geoserver-users mailing list
Geoserver-users@anonymised.com.382…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313

fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


I think that you need to modify the clients to format the timestamp returned into your local timezone and prefered format. ALternatively you could store the timestamps as strings using the oracle time format in the database.

Ian

···

On 30 December 2016 at 19:28, carrbrpoa <carrbrpoa@anonymised.com> wrote:

Hello,

I’ve created an Oracle store over GeoServer 2.7.2 and now I’m trying to
retrieve features data (datetime field included) through WFS’
GetFeatureInfo.

Example from date in Oracle, formatted with /to_char(MYDATE, ‘HH24:MI:SS
DD-MON-RRRR’)/:
10:07:28 30-DEZ-2016

The problem is that when I click the feature in GeoServer’s layer preview
(GeoJSON), it shows “2016-12-30Z” and OpenLayers is even worse, showing
“12/29/16 10:00 PM”.

Any ideas on how to solve this issue? I would like to consume GetFeatureInfo
in my application and obtain the datetime as Oracle stores it.

Thanks in advance!


View this message in context: http://osgeo-org.1560.x6.nabble.com/Datetime-in-GetFeatureInfo-tp5301657.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


Check out the vibrant tech community on one of the world’s most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


Geoserver-users mailing list
Geoserver-users@anonymised.com.382…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Ian Turton