Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341020

Summary: [xpath2] DayTimeDuration arithmetic relies on today's date
Product: [WebTools] WTP Source Editing Reporter: Jesper Moller <jesper>
Component: wst.xpathAssignee: Jesper Moller <jesper>
Status: RESOLVED FIXED QA Contact: Jesper Moller <jesper>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jesper Moller CLA 2011-03-25 21:00:53 EDT
xs:dayTimeDuration relies on javax.xml.datatype.Duration.getTimeInMillis() which takes a date to do the year and monts stuff correctly.

For our usecase, this is bad, since it also takes daylight savings time into account. Suddenly, 2 days and is not 2 days if you are two days away from a DST switch, which we happen to be in Denmark right now.

The fix is to use the fields as they are, and not meddle with javax.xml.datatype.Duration for math.
Comment 1 Jesper Moller CLA 2011-03-25 21:02:40 EDT
Fixed in HEAD