PHP date showing wrong time despite the timestamp being correct

后端 未结 4 890
北荒
北荒 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:07

    try this

    // set default timezone
    date_default_timezone_set('UTC');
    //define unix timestamp
    $timestamp = 1456778973;
    // output
    echo date('d M Y H:i:s',$timestamp);
    

    Try this converter too http://freeonlinetools24.com/

提交回复
热议问题