From e80d231f358f45e5f71ab0a26054b0c7de0cbe28 Mon Sep 17 00:00:00 2001 From: Elias Papanikitas Date: Wed, 13 Mar 2024 18:36:53 +0100 Subject: [PATCH] fixed taking out Z in reasoner for date time conversion --- config/reasoner/dl2op/main-info/mapping.n3 | 14 ++++++++------ config/reasoner/dl2op/main/mapping.n3 | 14 ++++++++------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/config/reasoner/dl2op/main-info/mapping.n3 b/config/reasoner/dl2op/main-info/mapping.n3 index 36c4585..6166723 100644 --- a/config/reasoner/dl2op/main-info/mapping.n3 +++ b/config/reasoner/dl2op/main-info/mapping.n3 @@ -145,16 +145,18 @@ PREFIX ere: # "2022-11-30T23:00:00Z"^^xsd:dateTime # So, the following rule adds 2 hours to the datetime, and then takes the date part of the UTC date time # to come to the date that the DL user selected (in CE(S)T) +# To make sure the date have the same convention we now save them as datetime without the timezone indicator { - ?dateTime :dateFromDateTime ?date -} <= { - ?date string:notMatches """^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}).*""" . - (?date "T00:00:00") string:concatenation ?datePlusTime. - (?datePlusTime xsd:dateTime) log:dtlit ?dateTime + ?date :dateTimeFromDate ?dateTime +} +<= +{ + ( ?date 1 10 ) string:substring ?dateSolo . + (?dateSolo "T00:00:00") string:concatenation ?datePlusTime. + (?datePlusTime xsd:dateTime) log:dtlit ?dateTime . }. - # ex:orgA besluit:classificatie . { { diff --git a/config/reasoner/dl2op/main/mapping.n3 b/config/reasoner/dl2op/main/mapping.n3 index 310f9c1..9d57423 100644 --- a/config/reasoner/dl2op/main/mapping.n3 +++ b/config/reasoner/dl2op/main/mapping.n3 @@ -131,13 +131,15 @@ PREFIX lblodlg: # and 1 December # "2022-11-30T23:00:00Z"^^xsd:dateTime # So, the following rule adds 2 hours to the datetime, and then takes the date part of the UTC date time -# to come to the date that the DL user selected (in CE(S)T) +# To make sure the date have the same convention we now save them as datetime without the timezone indicator { - ?dateTime :dateTimeFromDate ?date -} <= { - ?date string:notMatches """^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}).*""" . - (?date "T00:00:00") string:concatenation ?datePlusTime. - (?datePlusTime xsd:dateTime) log:dtlit ?dateTime + ?date :dateTimeFromDate ?dateTime +} +<= +{ + ( ?date 1 10 ) string:substring ?dateSolo . + (?dateSolo "T00:00:00") string:concatenation ?datePlusTime. + (?datePlusTime xsd:dateTime) log:dtlit ?dateTime . }. # ex:orgA besluit:classificatie .