Skip to content
This repository was archived by the owner on May 28, 2019. It is now read-only.

Date serialization's timezone handling is broken (seems hardcoded to UTC-06:00) #3

Closed
masklinn opened this issue Mar 24, 2012 · 1 comment
Labels

Comments

@masklinn
Copy link

The stringify date tests fail in every single browser I tested it in (Firefox 10, Chrome 16, Safari 5.1, Opera 11.61, Camino 2.1.2 [~Firefox 3.6]):

Dates are serialized using the simplified date time string format
    Expected: "\"1994-07-03T06:00:00.000Z\""
    Actual: "\"1994-07-02T22:00:00.000Z\""
The date time string should conform to the format outlined in the spec
    Expected: "\"1993-06-02T08:10:28.224Z\""
    Actual: "\"1993-06-02T00:10:28.224Z\""

This is on OSX 10.6.8 in the Central European Timezone (UTC+01:00).

There are 8h difference between the expected time and the actual time, on both dates the Date object uses CEST (UTC+02:00). I'd expect things to break even more as the timezone is moved further east (e.g. in the Australian timezones, between UTC+08:00 and UTC+11:00) on the testing machine.

@ghost ghost closed this as completed in 139d1eb Mar 24, 2012
@ghost
Copy link

ghost commented Mar 24, 2012

Those two tests were, indeed, MDT (UTC-06:00)-specific, as you correctly noted. I've updated them so that they'll check for the general date-time string pattern using a RegExp instead.

Thank you!

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

1 participant