Datetime in PHP Script

后端 未结 3 862
走了就别回头了
走了就别回头了 2020-12-22 02:10

I use a PHP script for a banlist that fetches the date and time, but I have an error and don\'t know how to convert it to \"normal\" time.

It lists me only the date

3条回答
  •  再見小時候
    2020-12-22 02:47

    Convert the date to UNIX timestamp first. Try with -

    $datetime = date("d.m.Y \\u\\m H:i \\U\\h\\r", strtotime($row['expires']));
    echo "$datetime";
    

提交回复
热议问题