[wp-trac] [WordPress Trac] #38642: current_time('mysql') and current_time('Y-m-d H:i:s') are returning different values

WordPress Trac noreply at wordpress.org
Thu Nov 3 06:16:43 UTC 2016


#38642: current_time('mysql') and current_time('Y-m-d H:i:s') are returning
different values
--------------------------+------------------------------
 Reporter:  yeetien       |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Date/Time     |     Version:  4.6.1
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by yeetien):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 Hi @dd32! Thanks for the prompt reply!

 WordPress timezone is Asia/Singapore
 PHP timezone is UTC

 The problem actually happens on staging sever. I tried setting my local
 machine to UTC (default was Asia/Singapore), and current_time('mysql') and
 current_time('Y-m-d H:i:s') are returning the same value.

 Think you right that the discrepancy is caused by some plugin. Or maybe
 it's some other server settings.

 Sorry that I reported a false positive. I'll update here if I find out
 more info.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38642#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list