Question: Problem With Date And Create Date 2

Problem With Date And Create Date 2

Hello, I need to know how to change the time zone in the application. What parameter should I use in app.php instead of UTC? I am having the following problem: when I create an entry, for ex

LA

Lucas Andrade

Asked

Hello, I need to know how to change the time zone in the application. What parameter should I use in app.php instead of UTC? I am having the following problem: when I create an entry, for example today, 27/12/2024, the date appears correctly, but both in the view of the entries and in the reports, it always shows the date of the previous day, for example, 27/12/2024. If I edit the entry, the date I entered is 12/27/2024. Can you help? The time zone of the VPS is fine according to my time zone, which is GMT -3 America/Sao_Paulo. Thank you.

This problem is the same?

https://tecdiary.net/support/question/problem-with-date-and-create-date

  • N

    Nishad

    Answered

    Hello, I think your php.ini timezone and config/app.php timezone are different. also check mysql timezone.

  • MS

    Mian Saleem

    Answered

    Hello,

    Please make sure that you have set correct timezone for the server and in config/app.php

    Thank you

  • MS

    Mian Saleem

    Answered

    Nishad Thank you for helping 😃

  • LA

    Lucas Andrade

    Answered

    Nishad I’ve checked everything, mysql is ok, PHP.ini too and the problem continues.

    What do I put in the option below:

    /* |-------------------------------------------------------------------------- | Application Timezone |-------------------------------------------------------------------------- | | Here you may specify the default timezone for your application, which | will be used by the PHP date and date-time functions. We have gone | ahead and set this to a sensible default for you out of the box. | */

    'timezone' => '-03:00',
    
  • N

    Nishad

    Answered

    can you try this : ‘timezone’ => ‘America/Sao_Paulo’,

  • LA

    Lucas Andrade

    Answered

    Hello, in the demo it was corrected, how do I replicate it to my code that I have installed on the VPS? Thank you

  • LA

    Lucas Andrade

    Answered

    Can you tell me which file to update so I don’t have to install the system again? Thank you

  • LA

    Lucas Andrade

    Answered

    And please let me know the parameter too…

  • MS

    Mian Saleem

    Answered

    Please download the file again and follow update instructions form documentation.pdf. Thank you

  • Login to Reply