Skip to content
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

Improve documentation about default DateTime format #838

Merged
merged 1 commit into from
Nov 14, 2017

Conversation

enumag
Copy link
Contributor

@enumag enumag commented Nov 14, 2017

Q A
Bug fix? no
New feature? no
Doc updated yes
BC breaks? no
Deprecations? no
Tests pass? no
Fixed tickets #836
License Apache-2.0

@@ -388,6 +388,8 @@ Available Types:
| | into Doctrine's ArrayCollection class. |
+----------------------------------------------------------+--------------------------------------------------+

*) If the standalone jms/serializer is used then default format is `\DateTime::ISO8601` (which is not compatible with ISO-8601 despite the name). For jms/serializer-bundle the default format is `\DateTime::ATOM` (the real ISO-8601 format) but it can be changed in [configuration](https://jmsyst.com/bundles/JMSSerializerBundle/master/configuration#configuration-block-2-0).
Copy link
Contributor Author

@enumag enumag Nov 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how to make the link correctly. This is probably not how it's supposed to be.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(which is not compatible with ISO-8601 despite the name).

can you elaborate? why is not compatible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See PHP documentation: http://php.net/manual/en/class.datetime.php#datetime.constants.atom

DateTime::ISO8601
DATE_ISO8601
    ISO-8601 (example: 2005-08-15T15:52:01+0000)

        Note: This format is not compatible with ISO-8601, but is left this way for backward compatibility reasons. Use DateTime::ATOM or DATE_ATOM for compatibility with ISO-8601 instead. 

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok!

@goetas
Copy link
Collaborator

goetas commented Nov 14, 2017

thanks!

@goetas goetas merged commit 9ab9959 into schmittjoh:master Nov 14, 2017
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