Jelle Bouwmans created SLING-11546:
--------------------------------------
Summary: ValueMap.get("calendar", String.class) conversion loses
timezone information
Key: SLING-11546
URL: https://issues.apache.org/jira/browse/SLING-11546
Project: Sling
Issue Type: Bug
Components: API, ResourceResolver
Affects Versions: Resource Resolver 1.6.16, API 2.21.0
Reporter: Jelle Bouwmans
When doing a ValueMap.get("calendar", String.class) conversion, before
SLING-8116,
ISO8601.format() was used. Now, Calendar.toInstant().toString() is used. This
gives a different result, because the ISO8601 gives the correct timezone, but
toInstant() gives the Zulu time.
toInstant() does the following:
{quote}public final Instant toInstant() \{ return
Instant.ofEpochMilli(getTimeInMillis()); }
{quote}
Timezones and offsets are completely ignored.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)