Files
alfresco-community-repo/rm-community/rm-community-repo/source/java/org
Tom Page 0a54487bcf Revert changes to getStartOfDay.
Sonar suggested using the Java 8 method Instant.truncatedTo, as it is faster than
DateUtils.truncate. However it has different handling of TimeZones, and the old
version of this code only works when the server is set to use UTC. In order to fix
this 'properly' we need code like:
  date = (date == null ? new Date() : date);
  return Date.from(date.toInstant().atZone(ZoneId.systemDefault()).truncatedTo(ChronoUnit.DAYS).toInstant());
which is significantly less readable than just using DateUtils.truncate. Given that
this code hasn't ever been highlighted by our profiling, I suggest we revert back
to the older code.
2018-01-18 16:13:20 +01:00
..
2018-01-18 16:13:20 +01:00