kevin-montrose/Jil — pull request #2 by yellis (2013-11-04 09:31:01+00:00)
Title: Modify DateTime Serialize Tests to account for user time zone when serializing to ISO8601

The DateTimeFormats serialization test did not pass when I ran this. I broke the test down into its four components to isolate the error. The culprit was the ISO8601 section of this test. The expected time string that was listed was 1980-01-01 05:00 UTC, while my test returned 1979-12-31 22:00 UTC. The reason for this is that the ISO8601 serialization converts to UTC time. The test was written for UTC-5, I am running the test in UTC+2. Thus, in its current implementation, the test would only pass when being run in the UTC-5 timezone.

I modified the ISO8601 test to generate an expected output string based on `DateTime(1980,1,1)` (which is generated in the local time zone) converted into UTC time (which would apply the offset from the local time zone). This now passes when I run it, and should pass for anyone else running it, regardless of their time zone.

Note - this is just a change to the test. The implementation of the the ISO8601 time to UTC is unchanged.