mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-23 02:14:16 +00:00
Test the time during a timezone change
This commit is contained in:
parent
efdbd77cad
commit
029849c09b
@ -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 ) {
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user