Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Cobol v5.0
  HXTT DBF v7.1
  HXTT Excel v6.1
  HXTT Json v1.0
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
  HXTT Word v1.1
  HXTT XML v4.0
Offshore Outsourcing
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Heng Xing Tian Tai Lab of Xi'an City (abbr, HXTT)

HXTT ACCESS
TimeZone
Robert Nimax
2010-01-25 03:06:33
Dear Sir or Madam,
we are using the JDBC 4.0 Driver for MS Access in an hibernate environment.
We downloaded the current version having the release date 2010-01-20 06:30.
Everything works great, but recently we spotted a problem regarding time zones.
Every update is 2 hours behind the current date.
Our location is Germnay, so there time zone should something like "Berlin" with daylight saving time. If I set the time zone manually to compensate the offet...
java.util.TimeZone.setDefault(java.util.TimeZone.getTimeZone("GMT+2"));...
...it works.
Other JDBC drivers do not have this problem.
So please tell me, what is wrong ?
Thank you for your help.

Robert Nimax
Re:TimeZone
HXTT Support
2010-01-25 03:31:28
What's your update sql? If you are using PreparedStatement, you should use PreparedStatement.setTimestamp(int parameterIndex, Timestamp x, Calendar cal).
Re:Re:TimeZone
Robert Nimax
2010-01-25 03:39:25
We are not using PreparedStatement directly. We are using the Grails framework which uses hibernate for OR-Mapping.
May it is a workaround to use JDBC instaed of GORM respectively hibernate at these code areas, but isn´t any other possibility ?
Re:Re:Re:TimeZone
Robert Nimax
2010-01-25 03:58:01
OK, I checked it. If we convert the calculated date (java.util.Date)to a java.sql.Timestamp, the prepared statement will work correcty and do a good job. But the problem is, that we actually do not use the JDBC-API directly because it is encapsulated by Grails/GORM respectively hibernate.
Maybe there is a chance if we modify our domain classes thate represent records of the database ?

Thank you for your help.

Robert Nimax
Re:Re:Re:Re:TimeZone
Robert Nimax
2010-01-25 05:47:24
Well, I changed the properties of the domain from java.util.Date to java.sql.Timestamp, but we have the same problem now. Maybe hibernate does not use PreparedStatement.setTimestamp(int parameterIndex, Timestamp x, Calendar cal) ?
Re:Re:Re:Re:Re:TimeZone
HXTT Support
2010-01-31 08:12:27
Please download the latest package, you can try timezone=local connection property.

Search Key   Search by Last 50 Questions




Google
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Refund | Sitemap