[JIRA] Created: (CAY-792) Date has issues with different locales when using XMLEncoder/XMLDecoder

From: Adrian Wiesmann (JIRA) ("Adrian)
Date: Wed May 23 2007 - 04:51:44 EDT

  • Next message: Mike Henderson: "unsubscribe"

    Date has issues with different locales when using XMLEncoder/XMLDecoder
    -----------------------------------------------------------------------

                     Key: CAY-792
                     URL: https://issues.apache.org/cayenne/browse/CAY-792
                 Project: Cayenne
              Issue Type: Bug
              Components: Cayenne Core Library
        Affects Versions: 3.0
             Environment: Problem was discovered when trying to encode data on a Linux machine and reading back on Windows with different locales.
                Reporter: Adrian Wiesmann
             Assigned To: Andrus Adamchik
             Attachments: patch.txt

    Date objects get encoded in this format when using the XMLEncoder (date.toString()):

    "EEE MMM dd HH:mm:ss zzz yyyy"

    which results in issues when trying to read back with the XMLDecoder under different locales. Even when using SimpleDateFormat with correct format string.

    I applied a patch which encodes/decodes dates in this format:

    "yyyy-MM-dd HH:mm:ss zzz"

    which works better with different locales.

    -- 
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
    



    This archive was generated by hypermail 2.0.0 : Wed May 23 2007 - 04:52:09 EDT