strftime() function showing incorrect time

后端 未结 3 476
闹比i
闹比i 2021-01-24 04:00

The strftime() function in php is not showing the correct time on my system. I am running php on xampp. Its around 11 o\'clock on my PC clock, but the function

3条回答
  •  隐瞒了意图╮
    2021-01-24 04:35

    You can also set your default timezone with running the following line on every request. You can achieve this easily if you put it in like a config.php or header.php file of your project.

    date_default_timezone_set ( string $timezone_identifier )
    

    Source: http://php.net/manual/en/function.date-default-timezone-set.php

    Timezone names: http://www.php.net/manual/en/timezones.php

提交回复
热议问题