You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2014/06/15 19:17:49 UTC
git commit: [MNG-5648] Regression of MNG-5176,
DST in effect is ignored
Repository: maven
Updated Branches:
refs/heads/master bd2b01d4e -> 5c78a8d2f
[MNG-5648] Regression of MNG-5176, DST in effect is ignored
Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/5c78a8d2
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/5c78a8d2
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/5c78a8d2
Branch: refs/heads/master
Commit: 5c78a8d2faa99398b2a8170fd3cf804ae0385e94
Parents: bd2b01d
Author: Michael Osipov <mi...@apache.org>
Authored: Sun Jun 15 18:59:28 2014 +0200
Committer: Michael Osipov <mi...@apache.org>
Committed: Sun Jun 15 19:16:07 2014 +0200
----------------------------------------------------------------------
.../src/main/java/org/apache/maven/cli/CLIReportingUtils.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/5c78a8d2/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
----------------------------------------------------------------------
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 cc649b5..8d06cd6 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 );