Issue1782856

classification
Title: Error in zxJDBC.Timestamp()
Type: Severity: normal
Components: Library Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: cgroves, r_walter
Priority: normal Keywords:

Created on 2007-08-27.19:31:30 by r_walter, last changed 2007-09-21.08:27:00 by cgroves.

Files
File name Uploaded Description Edit Remove
JavaDateFactory.java.diff r_walter, 2007-08-27.19:31:30 Patch for com.ziclix.python.sql.JavaDateFactory.java
Messages
msg1874 (view) Author: Roland Walter (r_walter) Date: 2007-08-27.19:31:30
The handling of Timestamp in zxJDBC seems not to be correct. Do this on the command-line:

Jython 2.2 on java1.6.0_02
Type "copyright", "credits" or "license" for more information.
>>> from com.ziclix.python.sql import zxJDBC
>>> timestamp=zxJDBC.Timestamp(2007, 8, 24, 14, 10, 0)
>>> print timestamp
2007-08-25 02:10:00.0

But print timestamp should yield 2007-08-24 14:10:00.0.

Solutin seems to be to replace Calendar.HOUR with Calendar.HOUR_OF_DAY in com.ziclix.python.sql.JavaDateFactory. This worked for me, using it for real queries.
msg1875 (view) Author: Charlie Groves (cgroves) Date: 2007-09-21.08:27:00
Fixed in r3491.  Thanks for tracking this down!
History
Date User Action Args
2007-08-27 19:31:30r_waltercreate