On Wed, 11 May 2005, Menno Jonkers wrote: > Hi, > > I'm under the impression that the getCalendar() method in > org.w3c.util.DateParser handles the time zone the wrong way around. > > In the example at [1] it is explained how these ISO dates both > correspond to November 5, 1994, 8:15:30 am, US Eastern Standard Time: > > 1994-11-05T08:15:30-05:00 > 1994-11-05T13:15:30Z > > Yet when running these through DateParser.parse() I get: > > Sat Nov 05 04:15:30 CET 1994 > Sat Nov 05 14:15:30 CET 1994 > > These differ (and are in my CET zone, but that shouldn't matter). java org.w3c.tools.util.DateParser will also output the same error. I used your patch (and added another test) and now the output is: ---------------------------------- >> 1997-07-16T19:20:30+01:00 >> Wed Jul 16 20:20:30 CEST 1997 [869077230000] >> 1997-07-16T18:20:30.00Z ---------------------------------- ---------------------------------- >> 1997-07-16T12:20:30-06:00 >> Wed Jul 16 20:20:30 CEST 1997 [869077230000] >> 1997-07-16T18:20:30.00Z ---------------------------------- Which is the expected output. Thanks for catching this! (and sorry for the delay). Best regards, -- Yves Lafon - W3C "Baroula que barouleras, au tiéu toujou t'entourneras."Received on Monday, 16 May 2005 12:34:43 GMT
This archive was generated by hypermail 2.2.0 + w3c-0.30 : Monday, 16 May 2005 12:34:45 GMT