DatePipe: error with timezones
See original GitHub issueI’m submitting a … (check one with “x”)
[x ] bug report
Current behavior When running tests locally:
Chrome 51.0.2704 (Mac OS X 10.11.5) DatePipe transform should format each component correctly FAILED
Expected 'PDT' to equal 'GMT'.
at /Users/chuckj/src/angular/modules/../../../../../../modules/@angular/common/test/pipes/date_pipe_spec.ts:67:51
at Object.<anonymous> (/Users/chuckj/src/angular/modules/../../../../../modules/@angular/core/testing/testing_internal.ts:146:25)
Expected/desired behavior No error
- Angular version: 2.0.0-rc.4
- Browser: Chrome 51.0.2704 (Mac OS X 10.11.5)
Local TZ set to PDT
@laskoviymishka could you please take a look - it has been introduced in #9816
If this is not fixed before RC5, we’ll revert the commit. Thanks
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Angular 4 date pipe displays wrong date because of time ...
Behind the scenes, DatePipe uses locale to display date in user's timezone. Try with client's timezone data: 1931-05-31T00:00:00.000-0300 ...
Read more >Feature Request: DatePipe timezone override · Issue #43031
There is no way to override the date pipe default timezone that isn't somewhat cumbersome. Add an injectable TIME_ZONE to the date pipe...
Read more >Format Date with Angular DatePipe (with Timezone Example)
The Angular DatePipe is used for formatting date according to the given data formats, locale information, and timezone.
Read more >Using Angular date pipe will convert my time, how can I ...
It looks like the timestamp you got from the server is missing its timezone component. I assume your PC is set to a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It should be more flexible than just hardcoded value I think. I take a look how it could be enhanced.
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.