PHP date showing wrong time despite the timestamp being correct

后端 未结 4 924
北荒
北荒 2021-01-04 10:41

I\'m having a problem with the PHP date function which I\'ve never had a problem with before.

The timestamp is entirely correct, however for some bizarre reason date

4条回答
  •  粉色の甜心
    2021-01-04 11:02

    For time zone: https://www.php.net/manual/en/timezones.php

    date_default_timezone_set('America/Chicago');

    echo date("m/d/Y h:i:s A");

提交回复
热议问题