Skip to content

fix date encodings - #21

Merged
creationix merged 2 commits into
creationix:masterfrom
rbren:master
Aug 2, 2018
Merged

creationix merged 2 commits into
creationix:masterfrom
rbren:master

Conversation

@rbren

@rbren rbren commented Jan 30, 2018

Copy link
Copy Markdown
Contributor

No description provided.

@rbren

rbren commented Jan 30, 2018

Copy link
Copy Markdown
Contributor Author

This is a copy of #15 with a cleaned up diff.

I do think it would be a bit safer to use the UTC string with milliseconds removed, rather than re-encoding the offset. Happy to do that if you agree.

@creationix

Copy link
Copy Markdown
Owner

I do think it would be a bit safer to use the UTC string with milliseconds removed, rather than re-encoding the offset

The timezone is significant information in git commits, if we drop this information, commit hashes will be changed and no longer match.

@rbren

rbren commented Jul 31, 2018

Copy link
Copy Markdown
Contributor Author

Sorry, I think I meant ISO string.

Right now the code lops off milliseconds and timezone data, then adds back the timezone data using date.offset...I think we could just slice out the milliseconds, and the ISO timezone string would match what the code currently calculates using date.offset.

@creationix

Copy link
Copy Markdown
Owner

As long as the tests pass and information isn't thrown away, I'm not particular on how it's implemented.

@creationix

Copy link
Copy Markdown
Owner

My understanding is JS Date objects can't store timezones. Make sure to test on several JS engines in case on non-standard behavior that makes it pass on just some.

@creationix
creationix merged commit ca5c033 into creationix:master Aug 2, 2018
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.

2 participants