clarify comment

This commit is contained in:
Boris De Vloed
2022-12-05 13:21:38 +00:00
parent 6591a5eaad
commit 6516b3cb28

View File

@@ -60,12 +60,22 @@ PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
# Backward arrow rule is like a function call.
# Removes time and timezone info in the returned date
# Removes time info in the returned date
# The user in DL selects a date via the UI.
# These dates are persisted as midnight dateTimes in UTC.
# Meaning that 1st of July is stored as
# "2022-06-30T22:00:00Z"^^xsd:dateTime
# 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)
{
?dateTime :dateFromDateTime ?date
} <= {
(?dateTimeLiteral xsd:dateTime) log:dtlit ?dateTime.
(?dateTimeLiteral 0 11) func:substring ?dateLiteral.
(?dateTime "PT2H"^^xsd:dayTimeDuration) func:add-dayTimeDuration-to-dateTime ?localDateTime.
(?localDateTimeLiteral xsd:dateTime) log:dtlit ?localDateTime.
(?localDateTimeLiteral 0 11) func:substring ?dateLiteral.
(?dateLiteral xsd:date) log:dtlit ?date.
}.