[MGNLEESOLR-105] Incorrect date is stored into Solr 'date' field Created: 18/Jul/16  Updated: 28/Jul/16  Resolved: 27/Jul/16

Status: Closed
Project: Solr Search Provider
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.3

Type: Bug Priority: Major
Reporter: Milan Divilek Assignee: Milan Divilek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 5m
Original Estimate: Not Specified

Issue Links:
relation
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: Kromeriz 54
Story Points: 1

 Description   

If Solr field of type="date" is used for storing the date, then the date is stored incorrectly.

Example: magnolia = 04.07.2016 14:50:00 in solr = "date_dt": "2017-01-02T14:50:00Z"

Reproduce:
1. /modules/content-indexer/config/indexers/websiteIndexer/fieldMappings@date change value to date_dt
2. Index page with property date



 Comments   
Comment by Milan Divilek [ 18/Jul/16 ]

Support score:
5+2+3+5+5+0

Comment by Daniel Bolliger [ 18/Jul/16 ]

Look at info.magnolia.module.indexer.indexservices.AbstractIndexService.
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-DD'T'HH:mm:ss'Z'");
but it should be with small dd in the format.
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");

Generated at Mon Feb 12 11:00:09 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.