Closed josegar74 closed 1 month ago
instead of extracting the year from the XML content, should we convert the date for these fields, not to UTC, but to the server timezone configured?
On the long run, we should probably rely on https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-datehistogram-aggregation.html#datehistogram-aggregation-time-zone, which means index in UTC and convert and format for a timezone
Previously the values were converted to UTC. If the timezone defined in the server is Europe/Madrid and the metadata has a creation date '2023-01-01T00:00:00', the index field creationYearForResource had the value 2022
Test case:
1) Create an ISO19139 and add a creation date
2023-01-01T00:00:00
.2) In the UI settings replace the Search application facet
creationYearForResource
with3) Go to the search page:
@fxprunayre, instead of extracting the year from the XML content, should we convert the date for these fields, not to UTC, but to the server timezone configured?
With the current change we are not dealing with metadata dates that have a timezone.
Checklist
main
branch, backports managed with labelREADME.md
filespom.xml
dependency management. Update build documentation with intended library use and library tutorials or documentation