question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DatePipe: error with timezones

See original GitHub issue

I’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:closed
  • Created 7 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
laskoviymishkacommented, Jul 11, 2016

It should be more flexible than just hardcoded value I think. I take a look how it could be enhanced.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 9, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >
DatePipe
Field type Format Description Era G, GG & GGG Abbreviated GGGG Wide GGGGG Narrow
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found