Hi,

Oracle is a bit peculiar with dates. In theory it does support timestamps (see 
for example http://www.oradev.com/oracle_timestamp.jsp). However, if you just 
want to show dates and times, create a view and convert Oracle dates into 
strings formatted as you like. It gets more complicated if you need to 
insert/update Oracle dates with WFS-T. We desided to use strings also in that 
case and our database gurus made something on the database side to do the 
conversion on-the-fly. 

-Jukka Rahkonen-


-----Alkuperäinen viesti-----
Lähettäjä: Gundel, Aaron [mailto:[email protected]]
Lähetetty: ke 2.3.2011 19:52
Vastaanottaja: Justin Deoliveira
Kopio: [email protected]
Aihe: Re: [Geoserver-users] oracle date time
 
In the database, it's a DATE field.  In Geoserver, it comes across as a Date.  
As Arne mentioned in the other post, using Timestamp in postgres seems to 
resolve this (as the GeoServer type changes to TimeStamp).  It doesn't in 
Oracle (timestamps don't even show up in the attribute list).  If there was 
some means to make the Oracle Date come across as a Timestamp (since it also 
contains a time), I'm wondering if that would resolve the issue.

Aaron

From: Justin Deoliveira [mailto:[email protected]]
Sent: Wednesday, March 02, 2011 7:44 AM
To: Gundel, Aaron
Cc: [email protected]
Subject: Re: [Geoserver-users] oracle date time

What is the type of the field at the database level? And if you do a wfs 
describeFeatureType what does the xml schema type come across as.

One thing that might help is to customize the feature type schema as described 
here:

http://docs.geoserver.org/stable/en/user/services/wfs/schemamapping.html

In which you can change the field type explicitly to xs:dateTime.

-Justin
On Tue, Mar 1, 2011 at 4:38 PM, Gundel, Aaron 
<[email protected]<mailto:[email protected]>> wrote:
Good day fellow GeoServer users,

I seem to have come across some type of issue with dates and times in 
GeoServer.  I'm using the oracle datastore to connect to a table that has a 
date field in it.  The times in this field are not coming across properly 
(they're all midnight - 12:00 - so I assume that means they're being truncated 
or somesuch along the way) when I do a wms getfeatureinfo call (or wfs 
getfeature call, for that matter).  Is there a workaround to get the time 
through to my application?  I'm turning the field into a string right now to 
get it across, but if there's a better way to do so, I'd certainly be 
interested.

Many thanks!

Aaron

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/geoserver-users



--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.



------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to