Merge pull request #116 from marc1706/calendar/one_day_off

Display correct day of the week with negative UTC offset
This commit is contained in:
Marc Alexander
2013-02-15 01:46:22 -08:00

View File

@@ -576,7 +576,7 @@ class portal_calendar_module
{
global $user;
$this->stamp = strtotime($date) + $user->timezone + $user->dst;
$this->stamp = strtotime($date);
return ($this->stamp);
}
@@ -629,12 +629,12 @@ class portal_calendar_module
for ($i = 1; $i < $this->daysMonth + 1; $i++)
{
$this->makeTimestamp("$i $this->ext_dateMM $this->dateYYYY");
$this->makeTimestamp("$i {$this->ext_dateMM} {$this->dateYYYY}");
$this->day[] = array(
"0" => "$i",
"1" => $this->dateMM,
"2" => $this->dateYYYY,
"3" => (date('w', $this->stamp))
'0' => "$i",
'1' => $this->dateMM,
'2' => $this->dateYYYY,
'3' => date('w', $this->stamp)
);
}
}