Open spapas opened 5 years ago
Please notice that this issue can be resolved by changing line 56 of ex_audit/lib/tracking/tracking.ex
:
from
now = DateTime.utc_now()
to
now = DateTime.utc_now() |> DateTime.truncate(:second)
I see, the problem is it needs to be configurable because some people are using the _usec
variants of the datetimes.
Hello @narrowtux, do you have any timeline on when will this bug be fixed?
TIA
You can solve this by migrating your recorded_at
to :utc_datetime_usec
Thanks @aerosol ... I was solving it till now by actually implementing the solution I described in my previous comment (https://github.com/ZennerIoT/ex_audit/issues/14#issuecomment-488563208)
@spapas - @aerosol suggestion required no code change at all in the library's code base - you only change the schema in your code base. As was noted in https://github.com/ZennerIoT/ex_audit/issues/14#issuecomment-488592623 this needs to be configurable. I.e some people will want microseconds others will not (although, I think a smart thing to do here is to stick with as much precision as possible).
Well at least you need to add a small clarification in the README to help any new users having this issue.
Hello, I am trying to integrate ex_audit wit my application using more or less the default configuration.
However when I try to save a model with changes I get the following error:
Any suggestions on how to fix ?
Here are the versions I use:
Also here's the whole ST:
Thanks !