-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Nanoseconds date precision #68
Labels
bug
Something isn't working
Comments
JS format should already work with default DateTimeValue format. Go format seems to be just a bit more precise? It may work already. But we should definitely add some tests for created datetime to check how accurate is the result object-mapper/src/Rules/DateTimeRule.php Lines 134 to 136 in e974721
https://github.com/orisai/object-mapper/tree/e974721d8c8d6008ae811c107bd8e7db942fe2fa/docs#datetime-rule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Library version
v1.x-dev
Description
Go serializes time to
2023-07-14T13:52:32.489932695Z
.This includes nanoseconds. PHP is not able to handle nanoseconds and
JsIsoFormat
fails.Steps to reproduce
This is probably general PHP problem.
Actual Behavior
DateTimeValue
will say it is not valid dateExpected Behavior
Validation should pass. We can strip those nanos, cos PHP does not support them either (AI said that :D)
Addition information
AI would solve it like this (this works with
u
instead ofv
tho)The text was updated successfully, but these errors were encountered: