Reputation: 4540
Inside a laravel project,php's date('Y-m-d H:i:s')
function is printing 6 hours minus time()
and Carbon::now()
is also printing the same.
Can anyone tell me, how can i print my current time?
In my laravel project's config/app.php
I have set 'timezone' => 'UTC'
.
Upvotes: 2
Views: 1264
Reputation: 2187
You need to specify "your" timezone:
In config/app.php
write:
'timezone' => 'Asia/Dhaka'
Upvotes: 4
Reputation: 163838
You can try to add timezone. Example from Carbon docs:
Carbon::now('Europe/London');
Upvotes: 4