Laragon showing UTC instead of local time


  • | 681 points

    Re: PHP date function giving wrong time [solved]

    I cannot find the file mentioned in this solved post, that is, config/app.php.

    Have set the timezone value in php.ini to 'America/Edmonton' but to no effect (after restarting Laragon). Also set the timezone in WordPress > Dashboard > Settings > General.

    I am doing a conditional display of content in a WordPress site based upon the weekday, but it's showing tomorrows content instead of todays :)

    Cheers!
    Lyle


  • | 133 points

    @SniffleValve
    Do you have any Wordpress plugins installed, that could be overwriting the timezone, eg: Woocommerce, which likes to use UTC.

    Also, what is the timezone displaying in the output of phpinfo()


  • | 681 points

    For "some reason" ;) ... it's now working :)

    phpinfo is now showing, and php is using, the timezone I set in php.ini.

    Cheers!
    Lyle


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.