note 128330 added to datetimezone.gettransitions
| From: | Tarkan at main dot php dot net | Date: | Wed, 22 Mar 2023 19:02:43 +0000 |
| Subject: | note 128330 added to datetimezone.gettransitions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220288@lists.php.net to get a copy of this message | ||
Hello,
New Zealand daylight saving time change dates are mostly one day ahead. Saturdays instead of
Sundays. For what ?
$tz = new DateTimeZone('Pacific/Auckland');
$transitions = $tz->getTransitions();
Results for 2023 :
0 =>
array (size=5)
'ts' => int 1672527600
'time' => string '2022-12-31T23:00:00+00:00' (length=25)
'offset' => int 46800
'isdst' => boolean true
'abbr' => string 'NZDT' (length=4)
1 =>
array (size=5)
'ts' => int 1680357600
'time' => string '2023-04-01T14:00:00+00:00' (length=25)
'offset' => int 43200
'isdst' => boolean false
'abbr' => string 'NZST' (length=4)
2 =>
array (size=5)
'ts' => int 1695477600
'time' => string '2023-09-23T14:00:00+00:00' (length=25)
'offset' => int 46800
'isdst' => boolean true
'abbr' => string 'NZDT' (length=4)
The correct answers are Sunday, April 2, 2023 for the change to winter time and Sunday, September
24, 2023 for the change to summer time.
Thanks.
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.13.130 (proxied: 77.78.70.234)
----
Manual Page -- https://php.net/manual/en/datetimezone.gettransitions.php
Edit -- https://main.php.net/note/edit/128330
Del: integrated -- https://main.php.net/note/delete/128330/integrated
Del: useless -- https://main.php.net/note/delete/128330/useless
Del: bad code -- https://main.php.net/note/delete/128330/bad+code
Del: spam -- https://main.php.net/note/delete/128330/spam
Del: non-english -- https://main.php.net/note/delete/128330/non-english
Del: in docs -- https://main.php.net/note/delete/128330/in+docs
Del: other reasons-- https://main.php.net/note/delete/128330
Reject -- https://main.php.net/note/reject/128330
Search -- https://main.php.net/manage/user-notes.php