[
https://issues.apache.org/jira/browse/DERBY-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12523915
]
Ken Johanson commented on DERBY-2235:
-------------------------------------
>if the string '2007-01-03 04:13:43' is converted to a TIMESTAMP in SQL then it
>will always represent '2007-01-03 04:13:43'
In what timezone? GMT? The server's?
I suspect (admittedly not having looked at the code nor tried Derby lately) the
actual behavior is that is will always be treated as the server's timezone (if
using a SimpleDateFormat and iso8601 format string, and not overriding the
default timezone, which DateFormat uses from TimeZone.getDefault()).
As I recall tz-less strings SHOULD (or MUST) be interpreted as the being in the
TZ of the receiving host (the server in this case), so if the above is true
then TZ-less strings are working okay.
For datetime and possibly timestamp, if a zone-offset IS provided in the string
I would argue that the server should have the option to accept this, even if it
will not store the TZ info.
> Server doesnt support timestamps with timezone
> ----------------------------------------------
>
> Key: DERBY-2235
> URL: https://issues.apache.org/jira/browse/DERBY-2235
> Project: Derby
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 10.2.2.0
> Reporter: Ken Johanson
> Priority: Minor
>
> DML with datetime literals having timzone offset data (ISO-8601):
> update tbl set dt1 = '2007-01-03 04:13:43.006 -0800'
> Causes:
> SQLException: The syntax of the string representation of a datetime value is
> incorrect.
> Error: -1 SQLSTATE: 22007
> I believe that even if the storage does not (does it?) support timezone
> storage, the input of a TZ could be normalized (offset applied) to the
> default TZ.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.