Default Date Format
Configure the default format inconfig/data.php:
DateTimeInterfaceCast and DateTimeInterfaceTransformer:
Custom Formats
Override the format per property:Using Carbon
The package automatically casts to the property type:Multiple Date Formats
Accept different date formats from various sources:This is useful when receiving dates from iOS and React applications that use different underlying formats.
Casting with Different Timezones
Specify the timezone of incoming dates:UTC timezone but represents the same moment in time as your application’s timezone.
Changing Timezones
On Cast
Convert the date to a different timezone during casting:UTC, one or two hours (depending on daylight saving) will be added.