Test the time during a timezone change

This commit is contained in:
Andrew Ruthven 2021-09-19 00:03:39 +12:00
parent efdbd77cad
commit 029849c09b
2 changed files with 37 additions and 0 deletions

View File

@ -125,6 +125,8 @@ $tests = array(
, new RRuleTest( "Six Working Days", "20110905", "FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR;COUNT=6" )
, new RRuleTest( "Six Working Days", "20110905", "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;COUNT=6" )
, new RRuleTest( "31st of each month", "20110831", "RRULE:FREQ=MONTHLY;BYMONTHDAY=31;COUNT=12" )
, new RRuleTest( "Expand over daylight savings change day forward - but no time change (2020-09-27)", "20200925T011500 Pacific/Auckland", "RRULE:FREQ=DAILY;COUNT=12" )
, new RRuleTest( "Expand over daylight savings change forward - time jump (2020-09-27)", "20200925T021500 Pacific/Auckland", "RRULE:FREQ=DAILY;COUNT=12" )
);
foreach( $tests AS $k => $test ) {

View File

@ -517,3 +517,38 @@ SQL Result:
2012-03-31 00:00:00 2012-05-31 00:00:00 2012-07-31 00:00:00 2012-08-31 00:00:00
2012-10-31 00:00:00 2012-12-31 00:00:00 2013-01-31 00:00:00 2013-03-31 00:00:00
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
20200925T011500 Pacific/Auckland - RRULE:FREQ=DAILY;COUNT=12
Expand over daylight savings change day forward - but no time change (2020-09-27)
PHP & SQL results are identical (-:
PHP Result:
2020-09-25 01:15:00 2020-09-26 01:15:00 2020-09-27 01:15:00 2020-09-28 01:15:00
2020-09-29 01:15:00 2020-09-30 01:15:00 2020-10-01 01:15:00 2020-10-02 01:15:00
2020-10-03 01:15:00 2020-10-04 01:15:00 2020-10-05 01:15:00 2020-10-06 01:15:00
SQL Result:
2020-09-25 01:15:00 2020-09-26 01:15:00 2020-09-27 01:15:00 2020-09-28 01:15:00
2020-09-29 01:15:00 2020-09-30 01:15:00 2020-10-01 01:15:00 2020-10-02 01:15:00
2020-10-03 01:15:00 2020-10-04 01:15:00 2020-10-05 01:15:00 2020-10-06 01:15:00
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
20200925T021500 Pacific/Auckland - RRULE:FREQ=DAILY;COUNT=12
Expand over daylight savings change forward - time jump (2020-09-27)
PHP & SQL results are identical (-:
PHP Result:
2020-09-25 02:15:00 2020-09-26 02:15:00 2020-09-27 03:15:00 2020-09-28 03:15:00
2020-09-29 03:15:00 2020-09-30 03:15:00 2020-10-01 03:15:00 2020-10-02 03:15:00
2020-10-03 03:15:00 2020-10-04 03:15:00 2020-10-05 03:15:00 2020-10-06 03:15:00
SQL Result:
2020-09-25 02:15:00 2020-09-26 02:15:00 2020-09-27 03:15:00 2020-09-28 03:15:00
2020-09-29 03:15:00 2020-09-30 03:15:00 2020-10-01 03:15:00 2020-10-02 03:15:00
2020-10-03 03:15:00 2020-10-04 03:15:00 2020-10-05 03:15:00 2020-10-06 03:15:00
0