You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Obviously no problem appears when the app runs on a UTC local time.
The issue seems to happen only with audits (no other model is impacted), is there a way to get the correct timestamp for audits ?
The text was updated successfully, but these errors were encountered:
Hello !
I've been upgrading a Rails app to Rails 5, and needed to upgrade audited to a newer version (>= 5.0.0).
Some of our unit tests failed because of timezone offset being applied twice on the created_at field for audits.
Here is an example of what happens:
Supposed server time is 1970-01-01 10:00:00 +02:00
> SomeModel.last.update!(audited_column: "fake value")
> SomeModel.last.audits.last.created_at
=> 1970-01-01 12:00:00 +02:00
Expected behavior:
> SomeModel.last.audits.last.created_at
=> 1970-01-01 10:00:00 +02:00
Obviously no problem appears when the app runs on a UTC local time.
The issue seems to happen only with audits (no other model is impacted), is there a way to get the correct timestamp for audits ?
The text was updated successfully, but these errors were encountered: