angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng serve doesn't consider the timezone when printing the output

Open nsebs opened this issue 8 years ago • 5 comments

Bug Report or Feature Request (mark with an x)

- [x] bug report
- [ ] feature request

Command (mark with an x)

- [ ] new
- [ ] build
- [x] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

Angular CLI: 6.2.4 Node: 8.12.0 Yarn: 1.10.1 OS: linux x64 Angular: 6.1.10

Repro steps

ng serve

The log given by the failure

As it's seen on the next image, the date on the machine and the date on the ng serve output differ (more precisely, the timezone is not being considered).

screenshot from 2018-10-11 14-42-42

Desired functionality

The log should print the correct local date and time.

nsebs avatar Oct 11 '18 17:10 nsebs

The time is in UTC notice the Z at the end of the time stamp. This is intentional and intended.

clydin avatar Oct 11 '18 19:10 clydin

Could this decision be revisited?

Why was this intended to work like this?

The log is not shown on a server located in another part of the planet (as ng serve is not intended for use in production, only during development). This log is only seen for the developer working on a local machine, it should't have to calculate another timezone (or get a standard global one, like Z).

I understand that this is just a minor inconvenience, that you just can watch the minutes only to get the reference, but is making long coding sessions more complicated (and for no apparent reason).

nsebs avatar Oct 11 '18 20:10 nsebs

For somebody who still wants to override this: node_modules/@angular-devkit/build-angular/src/angular-cli-files/utilities/stats.js

replace new Date().toISOString() with new Date().toString()

mavwolverine avatar Dec 22 '18 16:12 mavwolverine

Is there any plan to have this configurable at least for all workspaces?

alexagranov7 avatar Jan 30 '19 02:01 alexagranov7

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.