[wp-trac] [WordPress Trac] #53780: PHP 8.1: DateTimeZone::getTransitions() change

WordPress Trac noreply at wordpress.org
Wed Aug 3 07:41:38 UTC 2022


#53780: PHP 8.1: DateTimeZone::getTransitions() change
--------------------------+------------------------------
 Reporter:  autotutorial  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Date/Time     |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  php81 close   |     Focuses:
--------------------------+------------------------------

Comment (by Rarst):

 Replying to [comment:10 autotutorial]:
 > Actually you can check by creating a date with the DateTime class and
 php decides when DST or ST or other offset exists

 Checking if timezone is in DST ''right now'' doesn't help us to
 reimplement this. The current output is if time zone is changing to/from
 DST during a year, which is determined by checking for a future transition
 event.

 Checking if time zone is or isn't in DST ''now'' doesn't tell that,
 because it might be permanent state of it. Some time zones don't have DST,
 some are ''permanently'' in DST. Or at least that's the real world
 situation, sans deep dive to check how PHP interprets that.

 Maybe we should just drop the not having DST case altogether and rather
 not mention anything than risk incorrect and confusing info.

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


More information about the wp-trac mailing list