Details
Description
Castor has a method for forcing what timezone to read dates with. (See http://www.castor.org/types.html#SQL-Dates-and-Default-Timezone). The problem is that this setting has not effect on what you write to the database. So you don't have round-trip integrity of date, time and timestamp values.
For example, if I set the timezone to be 'UTC' in the castor.properties. When I write a date to the database it will write it to the database as 'PDT' (my local timezone) cause this is what the JDBC driver defaults too. But when I read it back it will convert it to 'UTC' because castor is is only converting on reads. So my dates will be 8 hours off of what they should be. Anyway, not the clearest explanation...sorry. I've attached a modified SQLTypeInfos.java file that should address the issue.
Issue Links
- is depended upon by
-
CASTOR-1285
Complete support for Calendar during reads/writes to apply to various type conversions
-
Activity
| Field | Original Value | New Value |
|---|---|---|
| Component/s | JDO [ 11331 ] |
| Attachment | patch.c1276.20051202.txt [ 17903 ] |
| Fix Version/s | 1.0 [ 11700 ] |
| Assignee | Werner Guttmann [ wguttmn ] |
| Fix Version/s | 1.0 M1 [ 12121 ] | |
| Fix Version/s | 1.0 [ 11700 ] |
| Attachment | patch.C1276.20051218.txt [ 18177 ] |
| Attachment | patch.C1276.20051218-002.txt [ 18179 ] |
| Link | This issue is depended upon by CASTOR-1285 [ CASTOR-1285 ] |
| Attachment | patch.C1276.20051219.test.txt [ 18180 ] |
| Fix Version/s | 1.0 [ 11700 ] | |
| Fix Version/s | 1.0 M1 [ 12121 ] |
| Fix Version/s | 1.0 [ 11700 ] | |
| Fix Version/s | 1.0 M2 [ 12202 ] |
| Fix Version/s | 1.0 M3 [ 12298 ] | |
| Fix Version/s | 1.0 M2 [ 12202 ] |
| Fix Version/s | 1.1 [ 11701 ] | |
| Fix Version/s | 1.0 M3 [ 12298 ] |
| Component/s | JDO [ 11331 ] | |
| Component/s | JDO types [ 12102 ] |
| Assignee | Werner Guttmann [ wguttmn ] |
| Fix Version/s | 1.1.1 [ 13080 ] | |
| Fix Version/s | 1.1 [ 11701 ] |
| Assignee | Ralf Joachim [ rjoachim ] |
| Attachment | patch-C1276-20070130.txt [ 25493 ] |
| Attachment | TestTemplate.java [ 25511 ] |
| Attachment | patch-C1276-20070205.txt [ 25585 ] |
| Attachment | patch-C1276-20070307.txt [ 26157 ] |
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
| Status | Resolved [ 5 ] | Closed [ 6 ] |
Thanks, Brian. In future, when attaching patches, can you please attach a unified patch only ?