Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

date filter not adding appropriate + / - sign for 'Z' timezone offset resulting in invalid ISO 8601 #1532

Description

See jsfiddle example here: http://jsfiddle.net/traeregan/C82QB/

e.g. the output I get in EDT is:
2012-11-06T01:29:290500

But it should be:
2012-11-06T01:29:29-0500

Activity

  1. pkozlowski-opensource commented on Nov 23, 2012

    @pkozlowski-opensource
    Member

    Hmm, just tested in CET (UTC+1) and properly getting 2012-11-23T23:06:19-0100.

  2. pkozlowski-opensource commented on Nov 24, 2012

    @pkozlowski-opensource
    Member

    @TraeRegan I think you are right, there is something fishy going on here... According to http://en.wikipedia.org/wiki/ISO_8601:

    The offset from UTC is given in the format ±[hh]:[mm], ±[hh][mm], or ±[hh]. So if the time being described is one hour ahead of UTC (such as the time in Berlin during the winter), the zone designator would be "+01:00", "+0100", or simply "+01".

    and then

    To calculate UTC time one has to subtract the offset from the local time, e.g. for "15:00-03:30" do 15:00 − (−03:30) to get 18:30 UTC.

    So in my case (GMT+1) it looks like it should be giving 2012-11-23T23:06:19+0100 while it gives 2012-11-23T23:06:19-0100. It looks like the sign is flipped, there is a similar issue opened already for this: #1261

    On top of this the + sign is never added.

  3. IgorMinar commented on Feb 7, 2013

    @IgorMinar
    Contributor

    fixed by b001c8e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions