mirror of
https://github.com/rlanvin/php-rrule.git
synced 2025-02-26 15:54:14 +01:00
Add test that proves the issue
This commit is contained in:
parent
15646f89da
commit
acc8876445
@ -2660,6 +2660,20 @@ class RRuleTest extends TestCase
|
|||||||
$this->assertEquals($occurrences, $rrule->getOccurrences(), 'Mismatched timezones makes for strange results');
|
$this->assertEquals($occurrences, $rrule->getOccurrences(), 'Mismatched timezones makes for strange results');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests timezone transition in Daylight Savings Time switch (bug #120)
|
||||||
|
* @see https://github.com/rlanvin/php-rrule/issues/120
|
||||||
|
*/
|
||||||
|
public function testDST()
|
||||||
|
{
|
||||||
|
$rrule = new RRule([
|
||||||
|
'FREQ' => 'WEEKLY',
|
||||||
|
'DTSTART' => new \DateTime('2022-10-30T01:00', new \DateTimeZone('America/Chicago')),
|
||||||
|
'COUNT' => 2,
|
||||||
|
]);
|
||||||
|
$this->assertSame('2022-11-06T01:00:00-05:00 CDT 1667714400', $rrule[1]->format('c T U'));
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Other tests
|
// Other tests
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user