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:
parent
7ae826d7da
commit
852f5436f9
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user