-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Dates are written with spaces #87
Comments
https://yaml.org/type/timestamp.html current implementation returns a valid timestamp but not in the canonical format => probably better to switch would require a major version bump => @mruoss what do you think? |
Yes thanks. Was about to check on yaml.org. Maybe we should have an issue template whwere it asks to point to official doc. So yes, according to doc, the current version is valid YAML but not canonical. Should it be? And yes, would be a major version. And not adapted to the 1.x version. |
Ooops, wrong button, sorry. |
@mruoss for now, I'm would opt to not make this configurable (wait for a concrete need to add some form of DateTime format option / param) |
@jlgeering Make what configuratble? The output format? I would not make that configurable... |
@joerichsen FYI this change might impact you |
I added the PR with DateTime support in order to read YAML stored in strings in our database, where data is stored by a Ruby on Rails application. So I just added the same format as Ruby stored it in in the PR. But I just checked and it seems like Ruby is able to read the canonical format just fine as well, so I think that using the canonical format instead makes more sense 👍 |
Perfect. Thanks for your heads up @joerichsen. |
encode timestamp with canonical format (iso8601) see #87
Given a resource struct:
The YAML output is:
When reading this data back in the application, this is not directly usable to create dates with.
For comparison, Jason encodes this as:
which can directly be read using
DateTime.from_iso8601()
The text was updated successfully, but these errors were encountered: