浏览代码

HDFS-17729. Inconsistent mtime in the results of -stat and -ls command due to different TimeZone. (#7405) Contributed by hfutatzhanghb.

Signed-off-by: Shilun Fan <slfan1989@apache.org>
hfutatzhanghb 3 月之前
父节点
当前提交
ca08047a92

+ 0 - 2
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Stat.java

@@ -22,7 +22,6 @@ import java.io.IOException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.LinkedList;
-import java.util.TimeZone;
 
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.classification.InterfaceStability;
@@ -73,7 +72,6 @@ class Stat extends FsCommand {
   protected final SimpleDateFormat timeFmt;
   {
     timeFmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-    timeFmt.setTimeZone(TimeZone.getTimeZone("UTC"));
   }
 
   // default format string