AtomGraph / LinkedDataHub

The low-code Knowledge Graph application platform. Apache license.
https://atomgraph.github.io/LinkedDataHub/
Apache License 2.0
493 stars 124 forks source link

Timezones get lost in date/time rendering #37

Closed namedgraph closed 3 years ago

namedgraph commented 4 years ago

After 3 edits, dct:created value is shown as being later than dct:modified:

Date Created
    21 August 2020 12:11
Date Modified
    21 August 2020 10:13
    21 August 2020 10:18
    21 August 2020 10:27

However in the RDF data the values correct, only the timezones are different (GMT+2 and GMT (Z)):

<http://purl.org/dc/terms/created>
    "2020-08-21T12:11:10.412+02:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
<http://purl.org/dc/terms/modified>
    "2020-08-21T10:27:31.125Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> , "2020-08-21T10:18:24.954Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> , "2020-08-21T10:13:28.324Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
namedgraph commented 4 years ago

It looks like we'll need to use adjust-dateTime-to-timezone() to normalize all xsd:dateTime values to the same timezone (which we need to supply via a param such as $ac:timezone).

Rendering template: https://github.com/AtomGraph/Web-Client/blob/master/src/main/webapp/static/com/atomgraph/client/xsl/imports/default.xsl#L273