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.

Reply via email to