-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use RFC3339 to format dates, fixes #16 #32
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So. while this technically is a breaking change, I don't think it will break anything too severely since I don't think there are many places that parse this from json.
This should also apply too https://github.com/ipfs/go-ipld-git/pull/32/files#diff-d280db36f672412d557878c23067458dL80
Also, do you mind looknig at how to port this to https://github.com/ipld/js-ipld-git? Thanks.
Other than someone looking at it manually, where else would this be relevant?
Ok, I'll fix that.
Sure, I can look into it. |
191186c
to
fa91985
Compare
I looked into doing this for js-ipld-git, there are two problems:
|
I don't think js team will be against adding the moment library, it's small and MIT licensed so it should be fine. Not preserving timezone information in parsed objects is a bit of a problem, would https://momentjs.com/timezone/ work for that? |
Ok, sounds good
Edit: I opened my changes as a PR ipld/js-ipld-git#43 |
@magik6k Sorry to bug about this again, the js version is merged so wondering if this can be merged too |
Fixes #16 by using a Unix timestamp with a parsed offset from UTC. I added two tests for it to match up with
git log --date=iso-strict
andgit log --date=raw
.