[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/datetime/src/ -> lmbDateTimeZone.class.php (summary)

(no description)

File Size: 3480 lines (121 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

lmbDateTimeZone:: (17 methods):
  lmbDateTimeZone()
  getDefault()
  setDefault()
  isValidId()
  isEqual()
  isEquivalent()
  hasDaylightTime()
  inDaylightTime()
  getDSTSavings()
  getOffset()
  getAvailableIds()
  getId()
  getLongName()
  getShortName()
  getDSTLongName()
  getDSTShortName()
  getRawOffset()


Class: lmbDateTimeZone  - X-Ref

time_zone representation class, along with time zone information data.

time_zone representation class, along with time zone information data.
The default timezone is set from the first valid timezone id found
in one of the following places, in this order:
1) global $_DATE_TIMEZONE_DEFAULT
2) system environment variable PHP_TZ
3) system environment variable TZ
4) the result of date('T')
If no valid timezone id is found, the default timezone is set to 'UTC'.
You may also manually set the default timezone by passing a valid id to
date_time_zone::set_default().

This class includes time zone data (from zoneinfo) in the form of a global array, $_DATE_TIMEZONE_DATA.
lmbDateTimeZone($id)   X-Ref
No description

getDefault()   X-Ref
No description

setDefault($id)   X-Ref
No description

isValidId($id)   X-Ref
No description

isEqual($tz)   X-Ref
Is this time zone equal to another


isEquivalent($tz)   X-Ref
Is this time zone equivalent to another

Tests to see if this time zone is equivalent to
a given time zone object.  Equivalence in this context
is defined by the two time zones having an equal raw
offset and an equal setting of "hasdst".  This is not true
equivalence, as the two time zones may have different rules
for the observance of DST, but this implementation does not
know DST rules.

hasDaylightTime()   X-Ref
Returns true if this zone observes daylight savings time


inDaylightTime($date)   X-Ref
Is the given date/time in DST for this time zone

Attempts to determine if a given date object represents a date/time
that is in DST for this time zone.  WARNINGS: this basically attempts to
"trick" the system into telling us if we're in DST for a given time zone.
This uses putenv() which may not work in safe mode, and relies on unix time
which is only valid for dates from 1970 to ~2038.  This relies on the
underlying OS calls, so it may not work on Windows or on a system where
zoneinfo is not installed or configured properly.

getDSTSavings()   X-Ref
Get the DST offset for this time zone

Returns the DST offset of this time zone, in milliseconds,
if the zone observes DST, zero otherwise.  Currently the
DST offset is hard-coded to one hour.

getOffset($date)   X-Ref
Get the DST-corrected offset to UTC for the given date

Attempts to get the offset to UTC for a given date/time, taking into
account daylight savings time, if the time zone observes it and if
it is in effect.  Please see the WARNINGS on date_time_zone::in_daylight_time().

getAvailableIds()   X-Ref
Returns the list of valid time zone id strings


getId()   X-Ref
Returns the time zone id  for this time zone, i.e. "America/Chicago"


getLongName()   X-Ref
Returns the long name for this time zone,
i.e. "Central Standard Time"


getShortName()   X-Ref
Returns the short name for this time zone, i.e. "CST"


getDSTLongName()   X-Ref
Returns the DST long name for this time zone, i.e. "Central Daylight Time"


getDSTShortName()   X-Ref
Returns the DST short name for this time zone, i.e. "CDT"


getRawOffset()   X-Ref
Returns the raw (non-DST-corrected) offset from UTC/GMT for this time zone




Generated: Fri Dec 5 04:05:07 2008 Cross-referenced by PHPXref 0.7