Bug 25944 - Calendar: Difference between Sun and Classpath while crossing DST "back"
Summary: Calendar: Difference between Sun and Classpath while crossing DST "back"
Status: UNCONFIRMED
Alias: None
Product: classpath
Classification: Unclassified
Component: classpath (show other bugs)
Version: 0.20
: P3 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-24 15:42 UTC by Endre Stølsvik
Modified: 2006-01-24 15:42 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Endre Stølsvik 2006-01-24 15:42:17 UTC
Here's adding a day (cal.add(Calendar.DAY_OF_MONTH, 1)) repeatedly on sun, crossing this year's DST on its way back:

Sat Oct 28 00:00:00 CEST 2006
Sun Oct 29 00:00:00 CEST 2006
Mon Oct 30 00:00:00 CET 2006
Tue Oct 31 00:00:00 CET 2006

Here's on Classpath 0.20 (both Kaffe and gij, so I assume classpath):

Sat Oct 28 00:00:00 GMT+02:00 2006
Sun Oct 29 00:00:00 GMT+02:00 2006
Sun Oct 29 23:00:00 GMT+01:00 2006
Mon Oct 30 23:00:00 GMT+01:00 2006
Tue Oct 31 23:00:00 GMT+01:00 2006

TimeZone is Europe/Oslo and also CET.

(Maybe another bug: I'm missing a "consistent"/"logical" way to "force" re-calculating from fields to time on Classpath's Calendar. Sun also had this problem, but invoking getTime() ensured that it was done. This "trick" doesn't work on Classpath's Calendar, but invoking .get(Date.DAY_OF_<whatever>) seems to work?!)