[jira] [Comment Edited] (JCR-4267) ISO8601.parse should support timezone designators in the form ±hhmm and ±hh

2021-05-28 Thread Hans-Peter Stoerr (Jira)


[ 
https://issues.apache.org/jira/browse/JCR-4267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17353019#comment-17353019
 ] 

Hans-Peter Stoerr edited comment on JCR-4267 at 5/28/21, 7:42 AM:
--

This has quite nasty consequences. 
com.day.jcr.vault:content-package-maven-plugin (I tried versions 0.0.12 and 
0.5.4) write package properties (e.g. creation time) using the format +=hhmm . 
If these packages are put into a filesystem registry, e.g. 
org.apache.jackrabbit.vault.packaging.impl.PackagePropertiesImpl.getCreated() 
returns null because it uses org.apache.jackrabbit.util.ISO8601.parse to parse 
the date - and that fails. So right now one has to use nasty workarounds like 
packageProps.getProperty(PackageProperties.NAME_CREATED) and parse it oneself. 
:( 

So I'd strongly support allowing these timezone formats. At least it should 
support date formats used by the normal tooling for Sling. Of course you could 
also change PackagePropertiesImpl, for that matter, but I'd think extending 
ISO8601 would be a better approach.


was (Author: hanspeterstoerr):
This has quite nasty consequences. 
com.day.jcr.vault:content-package-maven-plugin (I tried versions 0.0.12 and 
0.5.4) write package properties (e.g. creation time) using the format +=hhmm . 
If these packages are put into a filesystem registry, e.g. 
org.apache.jackrabbit.vault.packaging.impl.PackagePropertiesImpl.getCreated() 
returns null because it uses org.apache.jackrabbit.util.ISO8601.parse to parse 
the date - and that fails. So right now one has to use nasty workarounds like 
packageProps.getProperty(PackageProperties.NAME_CREATED) and parse it oneself. 
:( So I'd strongly support allowing these timezone formats.

> ISO8601.parse should support timezone designators in the form ±hhmm and ±hh
> ---
>
> Key: JCR-4267
> URL: https://issues.apache.org/jira/browse/JCR-4267
> Project: Jackrabbit Content Repository
>  Issue Type: Improvement
>  Components: jackrabbit-jcr-commons
>Affects Versions: 2.17.1
>Reporter: Konrad Windszus
>Priority: Major
>
> Currently the ISO8601.parse 
> (https://github.com/apache/jackrabbit/blob/86e15df24c68c8132361466c80f65862f8709880/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/ISO8601.java#L86)
>  method only supports a subset of time designators being specified by ISO8601.
> Namely the ones {{±hhmm}} and {{±hh}} are missing.
> This is currently a problem for Jackrabbit Filevault Maven Package, as that 
> is using these designators in 
> https://github.com/apache/jackrabbit-filevault-package-maven-plugin/blob/f53c53102e97d0bb000794ee2976cabecf62e5ad/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/VaultMojo.java#L1038.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (JCR-4267) ISO8601.parse should support timezone designators in the form ±hhmm and ±hh

2018-02-22 Thread Julian Reschke (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-4267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16372763#comment-16372763
 ] 

Julian Reschke edited comment on JCR-4267 at 2/22/18 1:00 PM:
--

Not convinced.

The parser purposefully implements the subset defined in 
https://www.w3.org/TR/NOTE-datetime and RFC 3339 (I think). Relaxing those 
constraints would make certain strings parse which we actually did not want to 
parse, because the protocols they appear in *require* the use of that subset.


was (Author: reschke):
Not convinced.

Why does filevault use this format when it never has been supported by the 
jackrabbit parser? How is including the timezone offset of any use here?

> ISO8601.parse should support timezone designators in the form ±hhmm and ±hh
> ---
>
> Key: JCR-4267
> URL: https://issues.apache.org/jira/browse/JCR-4267
> Project: Jackrabbit Content Repository
>  Issue Type: Improvement
>  Components: jackrabbit-jcr-commons
>Affects Versions: 2.17.1
>Reporter: Konrad Windszus
>Priority: Major
>
> Currently the ISO8601.parse 
> (https://github.com/apache/jackrabbit/blob/86e15df24c68c8132361466c80f65862f8709880/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/ISO8601.java#L86)
>  method only supports a subset of time designators being specified by ISO8601.
> Namely the ones {{±hhmm}} and {{±hh}} are missing.
> This is currently a problem for Jackrabbit Filevault Maven Package, as that 
> is using these designators in 
> https://github.com/apache/jackrabbit-filevault-package-maven-plugin/blob/f53c53102e97d0bb000794ee2976cabecf62e5ad/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/VaultMojo.java#L1038.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)