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
In our application we are using a custom Cake\Database\Type\DateTimeType::marshal() that extends the default CakePHP database type. Our implementation basically interprets strings with no timezone information as being in the user's local timezone.
Upgrading to audit-stash 3.0.2 causes timezone issues with the created timestamp in our application. Previously we received a \DateTime object which we handled correctly. Now, due to the changes in #48, we only receive a string Y-m-d H:i:s with no timezone information given, and our application interprets this as the wrong timezone.
I'm not sure if this is expected behavior and our application is simply at fault for interpreting them differently than UTC. But in any case, this looks like a behavior change which we cannot easily work around due to the tz information loss.
Modifying the type check in #48 to handle inherited classes would solve our issue, but I don't know if this breaks the original authors intent:
if (!is_subclass_of(Type::getMap('datetime'), DateTimeType::class)) {
Or maybe this should be configurable behavior. Any ideas on how to proceed here?
The text was updated successfully, but these errors were encountered:
In our application we are using a custom
Cake\Database\Type\DateTimeType::marshal()
that extends the default CakePHP database type. Our implementation basically interprets strings with no timezone information as being in the user's local timezone.Upgrading to audit-stash 3.0.2 causes timezone issues with the
created
timestamp in our application. Previously we received a\DateTime
object which we handled correctly. Now, due to the changes in #48, we only receive a stringY-m-d H:i:s
with no timezone information given, and our application interprets this as the wrong timezone.I'm not sure if this is expected behavior and our application is simply at fault for interpreting them differently than UTC. But in any case, this looks like a behavior change which we cannot easily work around due to the tz information loss.
Modifying the type check in #48 to handle inherited classes would solve our issue, but I don't know if this breaks the original authors intent:
Or maybe this should be configurable behavior. Any ideas on how to proceed here?
The text was updated successfully, but these errors were encountered: