\Horde_Timezone_Zone

Class representing a set of "Rule" timezone database entries of the same name.

Summary

Methods
Properties
Constants
__construct()
setTzid()
add()
toVtimezone()
No public properties found
No constants found
_getDate()
_getOffset()
$_name
$_tz
$_info
N/A
No private methods found
No private properties found
N/A

Properties

$_name

$_name : string

The timezone ID.

Type

string

$_tz

$_tz : 

A Horde_Timezone object.

Type

$_info

$_info : array

Zone lines of this zone object.

Type

array

Methods

__construct()

__construct(string  $name, \Horde_Timezone  $tz) 

Constructor.

Parameters

string $name

A timezone ID.

\Horde_Timezone $tz

A Horde_Timezone object. Used to retrieve rules for this timezone.

setTzid()

setTzid(string  $name) 

Sets the timezone ID.

There are aliases for timezone IDs, it might be necessary to use one of those.

Parameters

string $name

A timezone ID.

add()

add(array  $info) 

Adds a Zone line to this zone object.

Parameters

array $info

A parsed Zone line or continuation line.

toVtimezone()

toVtimezone(\Horde_Date  $from = null, \Horde_Date  $to = null) : \Horde_Icalendar_Vtimezone

Exports this zone to a VTIMEZONE component.

Parameters

\Horde_Date $from

The earliest date that we need timezone definitions for.

\Horde_Date $to

The latest date.

Throws

\Horde_Timezone_Exception

Returns

\Horde_Icalendar_Vtimezone —

A VTIMEZONE component representing this timezone.

_getDate()

_getDate(integer  $line) : \Horde_Date

Calculates a date from the date columns of a Zone line.

Parameters

integer $line

A line number.

Returns

\Horde_Date —

The date of this line.

_getOffset()

_getOffset(integer  $line) : array

Calculates an offset from the offset column of a Zone line.

Parameters

integer $line

A line number.

Returns

array —

A hash describing the offset.