admin管理员组文章数量:1130349
I'm using these two lines:
$expires = strtotime( $_POST['expire_date']);
if($expires < time())
to test the time in the name=expire_date form against GMT time. But no matter what I do my expire date time is 5 hours off. I'm in GMT -5, so I'm trying to adjust the top line:
$expires = strtotime( $_POST['expire_date']) - (( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ));
But it's not working. Any ideas for correct GMT offset handling in Wordpress?
I'm using these two lines:
$expires = strtotime( $_POST['expire_date']);
if($expires < time())
to test the time in the name=expire_date form against GMT time. But no matter what I do my expire date time is 5 hours off. I'm in GMT -5, so I'm trying to adjust the top line:
$expires = strtotime( $_POST['expire_date']) - (( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ));
But it's not working. Any ideas for correct GMT offset handling in Wordpress?
本文标签: dateTimezone for Plugin
版权声明:本文标题:date - Timezone for Plugin 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749112609a2317652.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论