[ Index ] |
|
Code source de LifeType 1.2.4 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 416 lignes (12 kb) |
Inclus ou requis: | 1 fois |
Référencé: | 1 fois |
Nécessite: | 0 fichiers |
Date_TimeZone:: (17 méthodes):
Date_TimeZone()
getDefault()
setDefault()
isValidID()
isEqual()
isEquivalent()
hasDaylightTime()
inDaylightTime()
getDSTSavings()
getOffset()
getAvailableIDs()
getID()
getLongName()
getShortName()
getDSTLongName()
getDSTShortName()
getRawOffset()
Classe: Date_TimeZone - X-Ref
\ingroup DataDate_TimeZone($id) X-Ref |
Constructor Creates a new Date::TimeZone object, representing the time zone specified in $id. If the supplied ID is invalid, the created time zone is UTC. param: string $id the time zone id return: object Date_TimeZone the new Date_TimeZone object |
getDefault() X-Ref |
Return a TimeZone object representing the system default time zone Return a TimeZone object representing the system default time zone, which is initialized during the loading of TimeZone.php. return: object Date_TimeZone the default time zone |
setDefault($id) X-Ref |
Sets the system default time zone to the time zone in $id Sets the system default time zone to the time zone in $id param: string $id the time zone id to use |
isValidID($id) X-Ref |
Tests if given id is represented in the $_DATE_TIMEZONE_DATA time zone data Tests if given id is represented in the $_DATE_TIMEZONE_DATA time zone data param: string $id the id to test return: boolean true if the supplied ID is valid |
isEqual($tz) X-Ref |
Is this time zone equal to another Tests to see if this time zone is equal (ids match) to a given Date_TimeZone object. param: object Date_TimeZone $tz the timezone to test return: boolean true if this time zone is equal to the supplied time zone |
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. param: object Date_TimeZone $tz the timezone object to test return: boolean true if this time zone is equivalent to the supplied time zone |
hasDaylightTime() X-Ref |
Returns true if this zone observes daylight savings time Returns true if this zone observes daylight savings time return: boolean true if this time zone has DST |
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. param: object Date $date the date/time to test return: boolean true if this date is in DST for this time zone |
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. return: int the DST offset, in milliseconds or zero if the zone does not observe DST |
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::TimeZone::inDaylightTime(). param: object Date $date the Date to test return: int the corrected offset to UTC in milliseconds |
getAvailableIDs() X-Ref |
Returns the list of valid time zone id strings Returns the list of valid time zone id strings return: mixed an array of strings with the valid time zone IDs |
getID() X-Ref |
Returns the id for this time zone Returns the time zone id for this time zone, i.e. "America/Chicago" return: string the id |
getLongName() X-Ref |
Returns the long name for this time zone Returns the long name for this time zone, i.e. "Central Standard Time" return: string the long name |
getShortName() X-Ref |
Returns the short name for this time zone Returns the short name for this time zone, i.e. "CST" return: string the short name |
getDSTLongName() X-Ref |
Returns the DST long name for this time zone Returns the DST long name for this time zone, i.e. "Central Daylight Time" return: string the daylight savings time long name |
getDSTShortName() X-Ref |
Returns the DST short name for this time zone Returns the DST short name for this time zone, i.e. "CDT" return: string the daylight savings time short name |
getRawOffset() X-Ref |
Returns the raw (non-DST-corrected) offset from UTC/GMT for this time zone Returns the raw (non-DST-corrected) offset from UTC/GMT for this time zone return: int the offset, in milliseconds |
Généré le : Mon Nov 26 21:04:15 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |