代码之家  ›  专栏  ›  技术社区  ›  Sinan Samet

显示错误时间的Angular CLI

  •  2
  • Sinan Samet  · 技术社区  · 6 年前

    输出:

    [ng] Date: 2020-03-11T08:08:14.687Z
    

    预期产量:

    [ng] Date: 2020-03-11T09:08:14.687Z
    

    time 在CLI中,它向我显示了正确的时间。它似乎与角CLI相关。

    为了清楚起见,这是我运行时得到的输出 ng build

    enter image description here

    这个时间不对,比我的时区晚了一个小时。

    1 回复  |  直到 6 年前
        1
  •  1
  •   Giannis    6 年前

    显示的日期以UTC为单位。请注意 Z 作为时间戳的最后一个字符。我想是故意的。

    请看一下这个问题: ng serve doesn't consider the timezone when printing the output