angular-cli - 我如何将角度 cli 日期更改为本地时区?
问题描述
我使用ng serve
并且当我更改某些文件时,Angular CLI 将显示这样的日期
Date: 2018-08-26T13:55:06.527Z - Hash: be4766fc643be6692ac3 - Time: 126ms
但这Date:2018-08-26T13:55:06.527Z
不是我的当地时间。
如何将角度 cli 日期更改为本地时区?我国的时区是台湾的UTC+8
解决方案
从代码来看,我认为这是不可能的:
export function generateBuildStats(hash: string, time: number, colors: boolean): string {
const w = (x: string) => colors ? bold(white(x)) : x;
return `Date: ${w(new Date().toISOString())} - Hash: ${w(hash)} - Time: ${w('' + time)}ms`
}
推荐阅读
- javascript - 如果要从第一个数组中删除第二个数组中不存在的对象
- java - Java - 如何从套接字附加到 jTextArea?
- html - 带有文本和点的进度条
- ios - iOS 11.4(15g77) 的设备支持文件
- java - Jsoup 去除字符串中的多个空格
- visual-studio-code - 使用 vscode 进行远程调试,console.log 有效,但 stdout 被抑制
- configuration - GitLab:从作业脚本影响作业配置
- python - 为什么赋值给None提示未定义变量
- reactjs - ReactJs Collapse 打开后关闭
- python-3.x - 打开时出现奇怪的语法错误