
|
If you were logged in you would be able to see more operations.
|
|
|
| Resolution Date: |
31/Jan/08 07:12 PM
|
|
For the Calendar type when the proxy is created the Timezone information is lost.
|
|
Description
|
For the Calendar type when the proxy is created the Timezone information is lost.
|
Show » |
made changes - 17/Aug/07 11:21 PM
| Field |
Original Value |
New Value |
|
Resolution
|
|
Fixed
[ 1
]
|
|
Fix Version/s
|
|
1.0.0
[ 12312341
]
|
|
Status
|
Open
[ 1
]
|
Resolved
[ 5
]
|
made changes - 20/Oct/07 12:47 AM
|
Assignee
|
|
Srinivasa
[ ssegu
]
|
|
Status
|
Resolved
[ 5
]
|
Reopened
[ 4
]
|
|
Resolution
|
Fixed
[ 1
]
|
|
made changes - 30/Jan/08 07:31 PM
|
Fix Version/s
|
|
1.1.0
[ 12312344
]
|
|
Fix Version/s
|
|
1.0.2
[ 12312846
]
|
made changes - 31/Jan/08 07:12 PM
|
Resolution
|
|
Invalid
[ 6
]
|
|
Status
|
Reopened
[ 4
]
|
Closed
[ 6
]
|
|
The current documented behavior is that a Calendar field will always have set the TimeZone that the field was initialized with. For example, if you have a class that defines:
Calendar myCalendar = Calendar.getInstance(TimeZone.getTimeZone("Europe/Budapest"));
and then you later set the field to a different TimeZone, e.g.:
myCalendar = Calendar.getInstance(TimeZone.getTimeZone("America/New_York"));
when the instance is persisted and then retrieved, the TimeZone will revert to "Europe/Budapest". Note that this is the only way to maintain consistent behavior so long as we don't actually persist TimeZone data (which we don't).
Also, see section 2.1.1 of the EJB 3.0 Java Persistence API spec, which says: 'Note that an instance of Calendar must be fully initialized for the type that it is mapped to'. That suggests that they expect the TimeZone information in the initialized Calendar to be the one that is used over time.
Please close this issue if you agree with the reversion; otherwise, please put in a comment about why you think the current behavior is incorrect.