WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #38940, comment 6


Ignore:
Timestamp:
11/25/2016 02:38:08 PM (3 years ago)
Author:
jdgrimes
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #38940, comment 6

    initial v1  
    66I understand that, but if some code outside of WordPress core uses `date_default_timezone_set()`, it will affect every call to `date()` in WordPress (and plugins), not just the `current_time()` function. `current_time()` is not used everywhere that WordPress retrieves the current date/time, so other places in the code will still be affected by the changed timezone, even though they are expected to be getting the UTC time. They would need to be updated to use `current_time()` or `gmdate()` in that case.
    77
    8 In fact, you could avoid changing the timezone in your patch fore `current_time()`, you could just update it to use `gmdate()` instead of `date()`, I think.
     8In fact, you could avoid changing the timezone in your patch for `current_time()`, you could just update it to use `gmdate()` instead of `date()`, I think.