【发布时间】:2016-08-31 14:46:32
【问题描述】:
我正在尝试将 Epoch/UNIX 时间转换为可读日期。请看下面的代码:
Get-Date 1472563804 -UFormat "%D %R"
PowerShell 抛出以下输出:
01/01/01 00:02
http://www.epochconverter.com/ 显示日期为 2016 年 8 月 30 日星期二 13:30:04 GMT,因此这似乎是 PowerShell 特有的问题。我还测试了其他 Epoch/UNIX 时间,PowerShell 继续抛出与上述相同的日期/时间。
【问题讨论】:
-
这个类型的问题之前问过:stackoverflow.com/questions/10781697/…
标签: powershell unix