Closed AEM5299 closed 5 months ago
Hello,
I encountered an issue with the following code:
echo CarbonPeriodImmutable::create('2024-01-01', '2024-01-05', CarbonTimeZone::create('Australia/Melbourne'))->first()->timezone
Carbon version: 3.3.1
PHP version: 8.2
I expected to get:
Australia/Melbourne
But I actually get:
UTC
In Carbon v2, the same code returns Australia/Melbourne as expected. I'm not sure if this is intended behaviour after the move to extend PHP's DatePeriod, but if it is I think it might need a callout in the upgrade guide.
DatePeriod
Thanks!
Hello,
I encountered an issue with the following code:
Carbon version: 3.3.1
PHP version: 8.2
I expected to get:
But I actually get:
In Carbon v2, the same code returns
Australia/Melbourne
as expected. I'm not sure if this is intended behaviour after the move to extend PHP'sDatePeriod
, but if it is I think it might need a callout in the upgrade guide.Thanks!