4

I use ng serve and when I change some file, Angular CLI will display date like this

Date: 2018-08-26T13:55:06.527Z - Hash: be4766fc643be6692ac3 - Time: 126ms

But the Date:2018-08-26T13:55:06.527Z is not my local time.

How could I change the angular cli date to local time zone? My country's time zone is UTC+8 in Taiwan

enter image description here

Kelvin Low
  • 390
  • 6
  • 22

2 Answers2

2

Judging by the code I think it is impossible:

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`
}
Frederik D
  • 93
  • 10
0

Replace Date().toISOString() in the follwing stats.js with Date().toString()

node_modules@angular-devkit\build-angular\src\webpack\utils\stats.js

dkmung
  • 1