Timezone Issue: UCT Time Incorrect
-
It shows:
Universal time (UTC) is 2018-03-26 20:25:00. Local time is 2018-03-27 04:25:00.But actually the UTC time
2018-03-26 20:25:00was my local time, and the correct UTC time should be2018-03-26 12:25:00.I’m sure not system/PHP problem. I do have tried to select WordPress Timezone as Shanghai/UTC+8, none works correctly. Now if I post a new comment, it will show as post 8 hours ago.
System time (CST = China Stand Time):
`
# date
Mon Mar 26 20:25:00 CST 2018
`php.ini:
`
date.timezone = Asia/Shanghai
`In this single PHP file, it shows as
Current time is 08:25:00pm:
`
<?php
date_default_timezone_set(“Asia/Shanghai”);
echo “Current time is ” . date(“h:i:sa”);
?>
`
The topic ‘Timezone Issue: UCT Time Incorrect’ is closed to new replies.