[
https://issues.apache.org/jira/browse/DERBY-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528119
]
Daniel John Debrunner commented on DERBY-2235:
----------------------------------------------
If one took the string ''2007-01-03 04:13:43.006 -0800' as equivalent to a
TIMESTAMP WITH TIME ZONE value then following the SQL Standard (section 4.6.2)
then a conversion to a TIMESTAMP WITHOUT TIME ZONE (which is what Derby
supports) will always result in:
2007-01-03 04:13:43.006
regardless of any server time zone.
TIMESTAMP WITH TIME ZONE ->> TIMESTAMP WITHOUT TIME ZONE = SV.UTC + SV.TZ
SV is the value to be converted, in this case the string which is broken
into two logical parts:
SV.UTC = 2007-01-03 12:13:43.006 (universal time)
SV.TZ = -0800 (offset from universal time)
SV.UTC + SV.TZ = 2007-01-03 04:13:43.006
> 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.