Open eteubert opened 6 years ago
I digged deep enough to find a workaround but not far enough to say with certainty where the bug lies.
It's a precision issue.
"2018-05-25T09:00:00+0000"
vs
"2018-05-25T09:00:00.000+0000"
In my understanding they should be treated equally when I pass them into Timex.parse!(datetime, "{ISO:Extended}")
regarding changesets but they are not.
My workaround is to remove the ms part from the source before parsing:
datetime
|> String.replace(".000+", "+")
|> Timex.parse!("{ISO:Extended}")
I expect there to be no database UPDATE when I add a date to the changeset that is identical to the one in the database, just like with native dates. However it looks like there is always an update happening. Is this a bug or am I using it wrong?
Context (shortened):