XStream
  1. XStream
  2. XSTR-242

XStream cannot properly unmarshal Calendar with different TimeZone

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.3
    • Component/s: None
    • Labels:
      None
    • JDK version and platform:
      Sun JDK 1.4.2_08 for Windows

      Description

      The unmarshaled Calendar instance uses the default time zone.

      public void testCalendar()

      { final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC")); final XStream xstream = new XStream(); final String xml = xstream.toXML(cal); final Calendar serialized = (Calendar)xstream.fromXML(xml); assertEquals(cal, serialized); }
      1. ExtendedTypesTest.diff
        1 kB
        Jörg Schaible
      2. GregorianCalendarConverter.patch
        2 kB
        Jörg Schaible
      3. GregorianCalendarConverterTest.java
        0.6 kB
        Jörg Schaible

        People

        • Assignee:
          Unassigned
          Reporter:
          Jörg Schaible
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: