0

When querying a source model in a VBD, with the source database being Informix 11, the values for a date column are sometimes returned as the prior day. For example, the actual value in Informix is Oct 10, but value shown when querying JDV source model is Oct 9. Querying Informix directly returns the correct date. I'm using JDV 6.4.0 with JDK 1.8.0_162 (x64) on Windows 10.

Any ideas? Thanks in advance!

  • I suspect there is some timezone offset happening. Can also double check with plain JDBC SQL clients like SquirreL and see what it reports? also check Teiid documentation on how to set the database offsets. – Ramesh Reddy Dec 08 '18 at 16:25

1 Answers1

0

To elaborate on what Ramesh is saying, you need to check the client and server jvm timezones. JDV will attempt to keep date/time calendar fields consistent across db, server, and client. If the Teiid client is in a different timezone than the server, the client will automatically alter UTC value for date/time values so that they match what the server would display - which is determined by the server timezone.

When a timestamp value is retrieved from the database we assume that it has already been adjusted by the driver to account for any timezone differences. If that is not the case there is a translator execution property called DatabaseTimeZone that will utilize the JDBC calendar based methods to adjust the retrieved date/time values.

A common issue would is a mismatch of daylight savings times - usually it's best to have the JDV server in a standard timezone.

Steven Hawkins
  • 538
  • 1
  • 4
  • 7
  • Thank you for the note, much appreciated. We had checked the TZ first off (in our case the server and client are located in the same building, but you never know if a configuration setting was wrong!), but that didn't appear to be the root cause. Curiously, we just updated to the latest EAP release in the 6.x series and the problem disappeared. Nothing in JDV or EAP release notes that relates to the issue we were seeing or a fix. But it looks like our issue is closed now. Thank you for your suggestion and help! – SoftwareDude Dec 12 '18 at 16:25