What?
My bad. By default data_api.request_date is actually Time (H:M:i). Should be the whole date with Time Zone offset.
That is how I coded it. Bad
Work around is
In your OAI Wrapper template instead of
<responseDate>{{ data_api.request_date }}</responseDate>
Use
{% set response_date = "now"|date("Y-m-d\TH:i:s\Z") %}
{% if data_api.request_date %}
{% set response_date = "now"|date("Y-m-d") ~ "T" ~ data_api.request_date|render ~ "now"|date("P") %}
{% endif %}
<responseDate>{{ response_date }}</responseDate>
The real solution is to actually return date("Y-m-d\TH:i:s\Z") from the controller as context which requires for those with custom twig templates manual changes (sorry @alliomeria I hate to do that, but its needed)
Also:
Arguments that contain : are wrongly split. I need a different splitting code (view:display:argument:value:api_argument) logic that splits the first 3, then the rest in reverse, joins what is not the last.
What?
My bad. By default
data_api.request_dateis actually Time(H:M:i). Should be the whole date with Time Zone offset.That is how I coded it. Bad
Work around is
In your OAI Wrapper template instead of
Use
{% set response_date = "now"|date("Y-m-d\TH:i:s\Z") %} {% if data_api.request_date %} {% set response_date = "now"|date("Y-m-d") ~ "T" ~ data_api.request_date|render ~ "now"|date("P") %} {% endif %} <responseDate>{{ response_date }}</responseDate>The real solution is to actually return date("Y-m-d\TH:i:s\Z") from the controller as context which requires for those with custom twig templates manual changes (sorry @alliomeria I hate to do that, but its needed)
Also:
Arguments that contain
:are wrongly split. I need a different splitting code (view:display:argument:value:api_argument) logic that splits the first 3, then the rest in reverse, joins what is not the last.