Mitchell Bösecke created an issue |
Issue Type: |
Bug |
---|---|
Affects Versions: |
2.15.3 |
Assignee: |
Unassigned |
Components: |
WFS |
Created: |
19/Feb/20 6:41 PM |
Priority: |
Medium |
Reporter: |
Using WFS, I insert a new record with a desired date of “2020-02-19” but it persists “2020-02-18” into the database. My column is in a postgresql database and is of type “date”. My database and OS are configured to use the MST timezone (-7). Sending any of these values to geoserver via WFS results in the undesired outcome:
Applying “org.geotools.localDateTimeHandling” does not resolve or even change the outcome. I can confirm the hint is being applied properly because a GetFeatureInfo request changes it’s response from “2020-02-18Z” to “2020-02-18”. It almost appears to affect reading data but not writing data. If I use the type “timestamp without time zone” in my postgresql database, I get the expected/desired outcome, i.e. it works correctly. If I was to guess as to what’s happening, I suspect the the input date “2020-02-19T07:00:00.000Z” first gets truncated (because the database column doesn’t store a time) to “2020-02-19” and then it undergoes a UTC->MST conversion, ultimately becoming “2020-02-18”. If it converted the timezone FIRST and then removed the time, I suspect it would have the desired outcome. |
Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS |
|
This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100121-sha1:96a3924) |