Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #53780, comment 10


Ignore:
Timestamp:
08/02/2022 10:26:16 PM (22 months ago)
Author:
autotutorial
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #53780, comment 10

    v2 v3  
    11Actually you can check by creating a date with the DateTime class and php decides when DST or ST or other offset exists transition that does not use 3600 seconds, also we have (wordpress) never checked for coincidence if the timezone parameter is offset since the timezone is theoretically set to UTC by the WordPress core.
    22In this RFC change the preferred mode to php, but previously used a reverse default mode.
     3
     4{{{#!php
     5<?php
     6
     7$tz = new DateTimeZone('Europe/Rome');
     8$date = new DateTime('now', $tz);
     9$dst = (bool) $date->format('I');
     10$transitions = $date->getTransitions($date->format('U'));
     11//$transitions is same transitions of $date?
     12
     13}}}
     14
    315
    416https://github.com/WordPress/WordPress/blob/master/wp-settings.php#L68 and rfc php force DST https://wiki.php.net/rfc/datetime_and_daylight_saving_time