[teiid-issues] [JBoss JIRA] (TEIID-3938) EdmDate and EdmTimeOfDay output in local timezone
Steven Hawkins (JIRA)
issues at jboss.org
Fri Jan 29 10:42:00 EST 2016
[ https://issues.jboss.org/browse/TEIID-3938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13156536#comment-13156536 ]
Steven Hawkins commented on TEIID-3938:
---------------------------------------
This highlights the issue with EdmDate:
TimeZone.setDefault(TimeZone.getTimeZone("GMT-1"));
java.sql.Timestamp date = EdmDate.getInstance().valueOfString("2000-01-01", true, 4000, 0, 0, true, java.sql.Timestamp.class);
assertEquals("1999-12-31 23:00:00.0", date.toString());
String val = EdmDate.getInstance().valueToString(date, true, 4000, 0, 0, true);
assertEquals("2000-01-01", date.toString());
The last line fails because the date will be "1999-12-31" instead.
> EdmDate and EdmTimeOfDay output in local timezone
> -------------------------------------------------
>
> Key: TEIID-3938
> URL: https://issues.jboss.org/browse/TEIID-3938
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Reporter: Steven Hawkins
> Assignee: Ramesh Reddy
> Fix For: 8.12.5
>
>
> EdmDate and EdmTimeOfDay both assume GMT for incoming string values - however when the convert from Java objects to string they use the local/default Calendar. So when Teiid is on a server not in GMT date and time value sent via the odata4 translator will likely be wrong.
> Ramesh:
> I have posted a question to the Olingo development group here http://markmail.org/search/list:org.apache.olingo.dev#query:list%3Aorg.apache.olingo.dev+page:1+mid:bfghfslrpwyjh6ii+state:results
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the teiid-issues
mailing list