You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

WooCommerce促销价结束时间使用UTC而非本地时区问题求助

关于WooCommerce促销价结束时间使用UTC而非本地时间的问题

我发现WooCommerce在设置促销价结束时间时,始终使用UTC时间而非本地时间,即便满足以下条件:

  • WordPress已设置为Europe/Paris时区
  • 服务器时间为Europe/Paris时区

已执行操作:

  • 在测试站点仅启用WooCommerce + Storefront主题
  • 在两家不同的主机服务商处进行测试
  • 确认php.ini中的时区设置正确
  • 通过shell的date命令验证服务器时间

测试结果:
无论如何设置,WooCommerce始终使用UTC时间显示促销价结束时间。以下为WooCommerce系统报告:

### Server Environment ###

Server Info: Apache
PHP Version: 7.4.32
PHP Post Max Size: 512 Mo
PHP Time Limit: 3600
PHP Max Input Vars: 250000
cURL Version: 7.71.0
OpenSSL/1.1.1p

SUHOSIN Installed: –
MySQL Version: 5.5.5-10.3.36-MariaDB
Max Upload Size: 512 Mo
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

我找到GitHub上两个相关的WooCommerce官方讨论议题,但目前仍未找到解决办法。

我不知道还能做什么来解决这个问题。

内容的提问来源于stack exchange,提问作者Viko

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.15 12:35:26