diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java index cc649b514e..8d06cd6132 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java @@ -21,6 +21,7 @@ package org.apache.maven.cli; import java.io.IOException; import java.io.InputStream; +import java.util.Date; import java.util.Locale; import java.util.Properties; import java.util.TimeZone; @@ -153,6 +154,10 @@ public final class CLIReportingUtils TimeZone tz = TimeZone.getDefault(); int offset = tz.getRawOffset(); + // Raw offset ignores DST, so check if we are in DST now and add the offset + if( tz.inDaylightTime( new Date( timestamp ) ) ) + offset += tz.getDSTSavings(); + long m = Math.abs( ( offset / ONE_MINUTE ) % 60 ); long h = Math.abs( ( offset / ONE_HOUR ) % 24 );