最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - Wordpress wrong dates bug

programmeradmin1浏览0评论

I am using Wordpress version 5.4.

I have a problem with the dates in a CPT, and it is that the dates show one day less.

Example: If I put in the backend the date, 08/18/20, in the frontend it shows me 08/17/20

I think for some reason the date_i18n function is not executing correctly.

This is the code where I show the dates:

<time><?php if (isset($event_from_date) && $event_from_date <> '') echo date_i18n(get_option('date_format'), strtotime($event_from_date)) . ','; ?></time>

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论