Bug 1278724 - Informix translator - date/time/timestamp values are adjusted differently according to timezone
Informix translator - date/time/timestamp values are adjusted differently acc...
Status: CLOSED CURRENTRELEASE
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: Teiid (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity unspecified
: ER1
: 6.3.0
Assigned To: David Le Sage
Juraj Duráni
: Documentation
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-06 04:48 EST by Juraj Duráni
Modified: 2016-08-24 07:43 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Known Issue
Doc Text:
The Informix translator adjusts time values according to the default server's timezone or the DatabaseTimeZone translator property (the translator property takes precedence). However date and timestamp values are adjusted only according to the DatabaseTimeZone translator property. Timestamp values are adjusted only if the DatabaseTimeZone property is set. Moreover, time values are adjusted in the "opposite" direction to date/timestamp values.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-24 07:43:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker TEIID-3808 Major Resolved Informix translator - date/time/timestamp values are adjusted differently according to timezone 2016-08-14 23:16 EDT

  None (edit)
Description Juraj Duráni 2015-11-06 04:48:39 EST
The Informix translator adjusts only time value according to server's timezone. Timestamp values are adjusted only if 'DatabaseTimeZone' property is set. Date values are not adjusted at all.

I am not sure what is Teiid's logic in this case. Is the difference between server's timezone and database's timezone taken into account? Or only the timezone of the database?
-------------------

Server's timezone - GMT+1
DatabaseTimeZone property - not overridden
Result:
|time|date|timestamp|
|01:00:00|2000-01-01|2000-01-01 00:00:00.0|

Server's timezone - GMT+5
DatabaseTimeZone property - not overridden
Result:
|time|date|timestamp|
|05:00:00|2000-01-01|2000-01-01 00:00:00.0|

Server's timezone - GMT+5
DatabaseTimeZone property - GMT+1
Result:
|time|date|timestamp|
|01:00:00|2000-01-01|2000-01-01 04:00:00.0|

Server's timezone - GMT+5
DatabaseTimeZone property - GMT-1
Result (int this case
|time|date|timestamp|
|23:00:00|2000-01-01|2000-01-01 06:00:00.0|

Informix:
...
datevalue date,
timevalue datetime hour to fraction(1),
timestampvalue datetime year to fraction(1),
...

VDB - foreign table:
...
DateValue date OPTIONS (NATIVE_TYPE 'date', NAMEINSOURCE 'datevalue'),
TimeValue timestamp OPTIONS (NATIVE_TYPE 'datetime hour to fraction(1)', NAMEINSOURCE 'timevalue'),
TimestampValue timestamp OPTIONS (NATIVE_TYPE 'datetime year to fraction(1)', NAMEINSOURCE 'timestampvalue'),
...

VDB - view:
...
DateValue date,
TimeValue time,
TimestampValue timestamp,
...
AS ... DateValue, convert(TimeValue, time), TimestampValue, ...
Comment 1 JBoss JIRA Server 2015-11-09 13:37:19 EST
Steven Hawkins <shawkins@redhat.com> updated the status of jira TEIID-3808 to Resolved

Note You need to log in before you can comment on or make changes to this bug.