You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "santiago garcía pimentel (JIRA)" <ji...@apache.org> on 2015/01/23 17:56:34 UTC

[jira] [Created] (SLING-4347) When a timezone is provided in a Date, it should be stored as provided

santiago garcía pimentel created SLING-4347:
-----------------------------------------------

             Summary: When a timezone is provided in a Date, it should be stored as provided
                 Key: SLING-4347
                 URL: https://issues.apache.org/jira/browse/SLING-4347
             Project: Sling
          Issue Type: Bug
          Components: Servlets
            Reporter: santiago garcía pimentel


Whenever a POST request is made and it contains a date string with a timezone in it. Sling turns it into the JVM local time and looses the provided timezone. The only exception for this is when the date is provided in the ISO8601 format, which uses a different date formatter.

Sling should instead preserve the date as it is provided.

This happens because Sling uses a SimpleDateFormat object to parse the Date string, which returns a date object.

We could follow an approach like org.apache.jackrabbit.util.ISO8601 to achieve this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)