protected static function _generateOffsetsForTransition(array $offsets, array $transition, $type)
{
// We can't use Horde_Date directly here, since it is unable to
// properly convert to UTC from local ON the exact hour of a std -> dst
// transition. This is due to a conversion to DateTime in the localtime
// zone internally before the timezone change is applied
$transitionDate = new DateTime($transition['time']);
$transitionDate->setTimezone(new DateTimeZone('UTC'));
$transitionDate = new Horde_Date($transitionDate);
$offsets[$type . 'month'] = $transitionDate->format('n');
$offsets[$type . 'day'] = $transitionDate->format('w');
$offsets[$type . 'minute'] = (int) $transitionDate->format('i');
$offsets[$type . 'hour'] = (int) $transitionDate->format('H');
for ($i = 5; $i > 0; $i--) {
if (self::_isNthOcurrenceOfWeekdayInMonth($transition['ts'], $i)) {
$offsets[$type . 'week'] = $i;
break;
}
}
return $offsets;
}