Skip to content

Date pipe adds 2 hours to iso 8601 formatted date string in chrome and safari #16624

@Waterstraal

Description

@Waterstraal

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior
A iso 8601 formatted string formatted by using the date pipe get added 2 hours in chrome

Expected behavior
The iso 8601 formatted string is formatted without adding 2 hours in chrome

Minimal reproduction of the problem with instructions
The following:

{{'2017-05-07T22:14:39'| date:'dd-MM-yyyy HH:mm'}}

Outputs 08-05-2017 00:14 instead of 07-05-2017 22:14

Plunker: http://plnkr.co/edit/pcoEmL1gR53tyqG9p6ZY?p=preview

What is the motivation / use case for changing the behavior?
Seems like a bug to me.

Please tell us about your environment:
Win 7, angular-cli 1.0, yarn

Angular version: 4.1.1

Browsers:

  • Chrome 57.0.2987.133
  • Safari on macOS 10.12.5 (10.1.1)
  • Safari on iOS 10.3.2

(Tested oké in Firefox 54.0a2, different issue in IE 11.0.9600.18639)

Language: TypeScript 2.2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: i18nIssues related to localization and internationalization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions