Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAssume local timezone when unspecified #124
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jugglinmike commentedJan 6, 2015
The behavior of the Date constructor is changing in ECMAScript 6: Date strings that do not specify a time zone will be interpreted in the local time (and not as GMT). This will cause Ampersand State's built-in
datedata type to behave inconsistently across platforms.This patch ensures consistency by explicitly interpreting Date strings without a time zone in the local system time in ECMAScript 5 environments. This should be considered a breaking change, which I recognize is a point against it. It would certainly be possible to avoid the break by instead patching the
datedata type to maintain its current behavior in ES6 environments, but I think that would be a nearsighted solution for two reasons:Dateconstructor behavior and come to expect it from abstractions that use it.Commit message: