hadoop fs -ls 和 hadoop fs -stat 返回的日期之间的差异

Difference between the date returned by hadoop fs -ls and hadoop fs -stat

返回的日期有区别吗
hadoop fs -ls myfile

hadoop fs -stat myfile

虽然默认情况下两者都会显示修改时间,但 -stat 以 UTC 显示时间,而 -ls 将其转换为本地时区并减少秒数。来自 Hadoop file system shell doc:

stat
Usage: hadoop fs -stat [format] path
... %x and %y show UTC date as “yyyy-MM-dd HH:mm:ss”