[teiid-issues] [JBoss JIRA] (TEIID-5376) Timezone handling discrepancies in MongoDB
Steven Hawkins (JIRA)
issues at jboss.org
Fri Jun 15 17:12:00 EDT 2018
[ https://issues.jboss.org/browse/TEIID-5376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Hawkins resolved TEIID-5376.
-----------------------------------
Resolution: Rejected
Since Teiid only supports timestamp without timezone this is the expected behavior. If UTC values are expected through-out, the server timezone must be set to UTC.
> Timezone handling discrepancies in MongoDB
> ------------------------------------------
>
> Key: TEIID-5376
> URL: https://issues.jboss.org/browse/TEIID-5376
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Reporter: Jan Martiska
> Assignee: Steven Hawkins
>
> Suppose this query against a MongoDB-backed VDB and you're running it in timezone UTC+1:
> {noformat}
> SELECT timestampvalue, HOUR(timestampvalue) AS TheHour FROM BQT1.SmallA WHERE (HOUR(timestampvalue) = 16);
> {noformat}
> If the database contains a timestamp '2000-01-01 16:00:00', you will get this row as result:
> ||timestampvalue||TheHour||
> |2000-01-01 17:00:00|16|
> Looks like this is because the {{timestampvalue}} column is fully evaluated by Teiid and converted into the user's timezone, but the {{hour()}} call is pushed and evaluated by MongoDB and therefore evaluated as UTC and is not converted by Teiid to user's timezone.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the teiid-issues
mailing list