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
This causes Nova to throw an exception when viewing the nova-settings page:
Failed to parse time string (\"2023-10-01T21:16:26.665577Z\") at position 0 (\"): Unexpected character at /path/to/project/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:87)
However, everything works properly if I chain on ->toISOString():
I also found it strange that this format appears to be ISO string (rather than ISO-8601), because Laravel docs say:
By default, the date and datetime casts will serialize dates to a UTC ISO-8601 date string (YYYY-MM-DDTHH:MM:SS.uuuuuuZ), regardless of the timezone specified in your application's timezone configuration option.
Yet that example given looks like ISO, not ISO-8601:
We are now using casts defined when calling addSettingsFields and instead of json serializing it we will let Nova do the logic. Now when you call nova_set_setting_value('retail_sale_products_last_updated', now()) it should work as expected.
We have a setting which is cast as a
datetime
.When we set the value through Nova, the value is stored in the table as:
However, when setting it via
nova_set_setting_value()
, the result is stored as a string:This causes Nova to throw an exception when viewing the nova-settings page:
However, everything works properly if I chain on
->toISOString()
:Here's our
NovaServiceProvider
:I also found it strange that this format appears to be ISO string (rather than ISO-8601), because Laravel docs say:
Yet that example given looks like ISO, not ISO-8601:
The text was updated successfully, but these errors were encountered: