Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341020 - [xpath2] DayTimeDuration arithmetic relies on today's date
Summary: [xpath2] DayTimeDuration arithmetic relies on today's date
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xpath (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Jesper Moller CLA
QA Contact: Jesper Moller CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-25 21:00 EDT by Jesper Moller CLA
Modified: 2011-03-28 04:04 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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