Skip to content

[SEMVER-MAJOR] Fix rest-coercion of timestamp strings#349

Merged
bajtos merged 1 commit into
masterfrom
fix/timestamp-sloppy-coercion
Sep 13, 2016
Merged

[SEMVER-MAJOR] Fix rest-coercion of timestamp strings#349
bajtos merged 1 commit into
masterfrom
fix/timestamp-sloppy-coercion

Conversation

@bajtos

@bajtos bajtos commented Sep 13, 2016

Copy link
Copy Markdown
Member

When converting a value coming from a string source like querystring to a date, and the value is a timestamp (i.e. an integer), we treat the value as a number now.

That way the value "0" always produces "1970-01-01T00:00:00.000Z" instead of some date around 1999/2000/2001 depending on server timezone.

Connect to #238

@Amir-61 @richardpringle please review
cc @STRML @ritch

When converting a value coming from a string source like querystring
to a date, and the value is a timestamp (i.e. an integer), we treat
the value as a number now.

That way the value "0" always produces "1970-01-01T00:00:00.000Z"
instead of some date around 1999/2000/2001 depending on server timezone.
@richardpringle

Copy link
Copy Markdown
Contributor

LGTM

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants