WordPress.org

Make WordPress Core

Changes between Initial Version and Version 11 of Ticket #38940


Ignore:
Timestamp:
06/29/2018 01:20:41 PM (17 months ago)
Author:
Rarst
Comment:

Duplicate of #37440.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #38940

    • Property Keywords has-patch dev-feedback 2nd-opinion added
    • Property Status changed from new to closed
    • Property Resolution changed from to duplicate
    • Property Milestone changed from Awaiting Review to
  • Ticket #38940 – Description

    initial v11  
    33Inspecting the code of `current_time()` confirmed this, because it formats the result using `date()` function (that is affected by timezone).
    44
    5 In fact seems Wordpress always resets the timezone to UTC; an `echo date_default_timezone_get();` placed at top and at bottom of wp-config.php in a clean WordPress setup will prove this.
     5In fact seems WordPress always resets the timezone to UTC; an `echo date_default_timezone_get();` placed at top and at bottom of wp-config.php in a clean WordPress setup will prove this.
    66
    77So using `date_default_timezone_set()` anywhere in theme or plugin code will broke `current_time()`.