clarify comment
This commit is contained in:
@@ -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.
|
||||
}.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user