[
https://issues.apache.org/jira/browse/SLING-4347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
santiago garcía pimentel updated SLING-4347:
--------------------------------------------
Description:
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.
http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/ISO8601.java
was:
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.
> 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.
> http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/ISO8601.java
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)