Skip to content

Commit

Permalink
Merge pull request DSpace#9155 from DSpace/backport-8984-to-main
Browse files Browse the repository at this point in the history
[Port main] Set Solr timezone to UTC when converting local date/time to the stored value that assumes Zulu (Z)
  • Loading branch information
tdonohue authored Oct 27, 2023
2 parents 1c86d00 + 3a9560e commit e9886c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dspace-api/src/main/java/org/dspace/util/SolrUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ private SolrUtils() { }
* @return date formatter compatible with Solr.
*/
public static DateFormat getDateFormatter() {
return new SimpleDateFormat(SolrUtils.SOLR_DATE_FORMAT);
DateFormat formatter = new SimpleDateFormat(SolrUtils.SOLR_DATE_FORMAT);
formatter.setTimeZone(SOLR_TIME_ZONE);
return formatter;
}
}

0 comments on commit e9886c3

Please sign in to comment.