1
0
mirror of https://github.com/rlanvin/php-rrule.git synced 2025-02-20 09:54:16 +01:00

Adding timezone-related tests for RSet

This commit is contained in:
rlanvin 2016-04-04 16:36:37 +03:00
parent 7ae826d7da
commit 852f5436f9

View File

@ -150,6 +150,28 @@ class RSetTest extends PHPUnit_Framework_TestCase
// TODO
}
public function testCombineMultipleTimezones()
{
$rset = new RSet();
$rset->addRRule(array(
'FREQ' => 'DAILY',
'COUNT' => 2,
'DTSTART' => date_create('2000-01-02 09:00', new DateTimeZone('Europe/Paris'))
));
$rset->addRRule(array(
'FREQ' => 'DAILY',
'COUNT' => 2,
'DTSTART' => date_create('2000-01-02 09:00', new DateTimeZone('Europe/Helsinki'))
));
$this->assertEquals(array(
date_create('2000-01-02 09:00', new DateTimeZone('Europe/Helsinki')),
date_create('2000-01-02 09:00', new DateTimeZone('Europe/Paris')),
date_create('2000-01-03 09:00', new DateTimeZone('Europe/Helsinki')),
date_create('2000-01-03 09:00', new DateTimeZone('Europe/Paris'))
), $rset->getOccurrences());
}
///////////////////////////////////////////////////////////////////////////////
// Other tests