Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ram-util中time_tran($the_time)函数中计算时间可能是有问题的 #43

Open
moxiaonai opened this issue Mar 28, 2020 · 1 comment

Comments

@moxiaonai
Copy link

wp版本:4.8.1

function time_tran($the_time){
    $now_time = date("Y-m-d H:i:s",time()+8*60*60); 
   ....
}

wp落库的时间应该是utc0时间,服务器和wp后台都设置了本地时间,比如:Asia/Shanghai的话,wp默认返回给前端的已经本地时区的时间。
wp 自带的rest接口返回是正常的。
拓展的接口中这里获取当前时间手动+8会导致所有用到的地方显示比实际早8小时。

@iamxjb
Copy link
Owner

iamxjb commented Mar 31, 2020

我已经修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants