From 029849c09ba18b763ccaf8343a2e2a1a7e038dc9 Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Sun, 19 Sep 2021 00:03:39 +1200 Subject: [PATCH] Test the time during a timezone change --- testing/test-RRULE-v2.php | 2 ++ .../regression-suite/0831-Spec-RRULE-1.result | 35 +++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/testing/test-RRULE-v2.php b/testing/test-RRULE-v2.php index 68b61dd0..4af049e8 100755 --- a/testing/test-RRULE-v2.php +++ b/testing/test-RRULE-v2.php @@ -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 ) { diff --git a/testing/tests/regression-suite/0831-Spec-RRULE-1.result b/testing/tests/regression-suite/0831-Spec-RRULE-1.result index d54d49cc..545d4340 100644 --- a/testing/tests/regression-suite/0831-Spec-RRULE-1.result +++ b/testing/tests/regression-suite/0831-Spec-RRULE-1.result @@ -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 +