[teiid-issues] [JBoss JIRA] (TEIID-5724) Issues with Informix Date/Time types

Steven Hawkins (Jira) issues at jboss.org
Fri Apr 19 14:06:00 EDT 2019


     [ https://issues.jboss.org/browse/TEIID-5724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Hawkins resolved TEIID-5724.
-----------------------------------
    Resolution: Done


Corrected the type mappings and updated the calendar methods to either not use a calendar or to use a cloned one.

The informix client will keep date/time/timestamp values consistent with respect to calendar fields for a given client timezone - that is regardless of what the client timezone is in, a value of 2000-01-01 01:01:01 will always be displayed in the local timezone.

The database timezone property should only be set if that is not the desired behavior, and instead want the values adjusted to assume a fixed timezone.  However as noted in the older issue the informix driver for some reason seems to adjust timestamps and time values in the opposite direction.  With the Teiid server in GMT (or really any timezone) a given set of row values for a query are:

Date   
2000-02-19  
Time
01:00:00  
Timestamp
2000-01-01 00:00:49.0

With the client in GMT and the DatabaseTimezone set to GMT-1, you see:
Date
2000-02-19 
Time
00:00:00   
Timestamp
2000-01-01 01:00:49.0

Note the time and timestamp moved in opposite directions.  I did not yet try to account for this assuming for now that most will want the default behavior.

> Issues with Informix Date/Time types
> ------------------------------------
>
>                 Key: TEIID-5724
>                 URL: https://issues.jboss.org/browse/TEIID-5724
>             Project: Teiid
>          Issue Type: Bug
>          Components: JDBC Connector
>            Reporter: Steven Hawkins
>            Assignee: Steven Hawkins
>            Priority: Major
>             Fix For: 12.2, 11.2.3, 12.1.1
>
>
> Informix date/time issues include:
> Timestamp/Time are mapped to the same conversion - datetime hour to second
> The Timestamp mapping needs to be fully specified - datetime year to fraction(5), not just datetime
> Usage of the getXXX Resultset methods passing a Calendar result in odd behavior as Informix modifies that Calendar.



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the teiid-issues mailing list