Closed Ali1 closed 5 years ago
If you use FrozenTime::now(), you should get the date serialized as a string, if I remember correctly. FrozenTime is the subclass of Chronos that better integrates with the framework.
Yes works perfectly, a nice string now appears. Thank you!
I use Chronos quite a lot and I'm in the habit of inserting dates using like this
$entity->cancelled = Chronos::now()
(without->toDateTimeString()
) because during marshalling, they are automatically converted to strings.I've just realised that it's being audited as a json object string:
You reckon changed properties could be forced into becoming strings in the audit log too to avoid the below? Or are there times when it's useful to have the whole object?