0

Using this function in laravel date('d-m-Y_H.i.s') I get the date in the expected format but I'm not able to change the timezone in order to get my current time. It's one hour delayed.

I have already tried to change timezone unsuccessfully in app.php 'timezone' => 'Europe/Madrid';
Also tried in Illuminate/Foundation/Bootstrap/LoadConfiguration.php date_default_timezone_set($config->get('app.timezone', 'Europe/Madrid'));

Thanks in advance :)

  • Does this answer your question? [Change Timezone in Lumen or Laravel 5](https://stackoverflow.com/questions/32884388/change-timezone-in-lumen-or-laravel-5) – Maxwell D. Dorliea Feb 22 '22 at 23:36

1 Answers1

0

You have two options:

Option1: Change UTC to user's timezone on frontend.

Option2: Change on backend.

How to manage timezone in Laravel

Ali Raza
  • 842
  • 7
  • 13