1
0
mirror of https://github.com/rlanvin/php-rrule.git synced 2025-02-26 15:54:14 +01:00

Merge pull request #8 from gordonzhao/master

Update occursAt function to handle DateTime in different timezone
This commit is contained in:
Rémi Lanvin 2016-03-24 09:10:02 +02:00
commit 3162337ace

View File

@ -732,7 +732,7 @@ class RRule implements RRuleInterface
*/ */
public function occursAt($date) public function occursAt($date)
{ {
$date = self::parseDate($date); $date = self::parseDate($date)->setTimezone($this->dtstart->getTimezone());
if ( in_array($date, $this->cache) ) { if ( in_array($date, $this->cache) ) {
// in the cache (whether cache is complete or not) // in the cache (whether cache is complete or not)