DateTimeZone¶
-
class
OC\DateTimeZone¶ Source: lib/private/DateTimeZone.php#33 Implements: OCP\IDateTimeZone
Properties¶
-
protected static property
OC\DateTimeZone::$config¶ Source: lib/private/DateTimeZone.php#35 Type: \OCP\IConfig
-
protected static property
OC\DateTimeZone::$session¶ Source: lib/private/DateTimeZone.php#38 Type: \OCP\ISession
Methods¶
-
public
OC\DateTimeZone::__construct($config, $session)¶ - Constructor
Source: Parameters: - $config (
OCP\IConfig) - $session (
OCP\ISession)
- $config (
-
public
OC\DateTimeZone::getTimeZone($timestamp=false)¶ - Get the timezone of the current user, based on his session information and config data
Source: Parameters: - $timestamp (bool | int)
Returns:
-
protected
OC\DateTimeZone::guessTimeZoneFromOffset($offset, $timestamp)¶ - Guess the DateTimeZone for a given offsetWe first try to find a Etc/GMT* timezone, if that does not exist,we try to find it manually, before falling back to UTC.
Source: Parameters: - $offset (mixed)
- $timestamp (bool | int)
Returns:
-
protected
OC\DateTimeZone::getDefaultTimeZone()¶ - Get the default timezone of the serverFalls back to UTC if it is not yet set.
Source: lib/private/DateTimeZone.php#126 Returns: string