sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason E Bailey <...@apache.org>
Subject Re: [Discussion] Date handling inconsistencies - resend
Date Fri, 20 Apr 2018 13:07:57 GMT
I cam to the same conclusion about the Content Loader, I'll make the bug and fix for that either
today or tomorrow.  For the second point, I will go ahead and make the bug fix, and do a pull
request so that we can get additional input on it. But I believe it's one of those things
that will need to be done at some point and I'd prefer sooner then later.

 I looked up the ECMA specification and the specification for the Date format is IS0-8601
so if someone is relying on the JSON response to be handled correctly at the browser level,
what we are supplying is currently supported only by the grace of the browser manufacturers.

- Jason

On Fri, Apr 20, 2018, at 4:05 AM, Stefan Seifert wrote:
> hello jason.
> 
> thanks for this comprehensive summary.
> 
> in my opinion for the long run the best solution is to use ISO-8601 for 
> all locations and deprecated the ECMA format and discourage usage of it 
> (but keep it where it's parsed for backward compatibility).
> 
> in this way we have two open points:
> 
> 1. Content Loader supports ISO-8601, but does not correctly handle the 
> timezones. this can be fixed by using the jackrabbit util class used in 
> the other places already. we should create a bug ticket and fix it right 
> away.
> 
> 2. the only real problematic place is the GET servlet/Default JSON 
> handler which currently outputs dates in ECMA by default. we could 
> change this easily, but this will break backwards compatibility of code 
> relying on it's output. in a very central piece of code.
> 
> once we are on java 8 (you opened a separate thread for this) we can fix 
> the ECMA parsing support easily. and alternative for java 7 would 
> probably be to use a thirdparty library like joda-time (have not checked 
> if this really solves this) - but this would mean an additionally 
> dependency in the starter/launchpad.
> 
> stefan
> 
> 

Mime
View raw message