-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: Laravel
ithuis has created Issue #2719: datetime casts not considering timezone in laravel-mongodb. This Jira ticket was filed by GromNaN
Issue Text:
- Laravel-mongodb Version: 4.1
- PHP Version: 8.2
- Database Driver & Version:
Description:
When using a timezone like "Europe\Amsterdam" the date is stored in UTC but when retrieved is not transformed in local time.
Steps to reproduce
1. create a model
2. dd( $model->created_at , Carbon::now() )
Expected behaviour
same ( not exactly ) date and time
Actual behaviour
created_at is 1 hour earlier