IDateTimeZone
in
Interface IDateTimeZone
Tags
Table of Contents
Methods
- getDefaultTimeZone() : DateTimeZone
- Get the timezone configured as the default for this Nextcloud server.
- getTimeZone() : DateTimeZone
- Get the timezone for a given user.
Methods
getDefaultTimeZone()
Get the timezone configured as the default for this Nextcloud server.
public
getDefaultTimeZone() : DateTimeZone
While the PHP timezone is always set to UTC in Nextcloud this is the timezone to use for all time offset calculations if no user value is specified.
Tags
Return values
DateTimeZonegetTimeZone()
Get the timezone for a given user.
public
getTimeZone([bool|int $timestamp = false ][, string|null $userId = null ]) : DateTimeZone
If a timestamp is passed the timezone for that given timestamp is retrieved (might differ due to DST). If no userId is passed the current user is used.
Parameters
- $timestamp : bool|int = false
- $userId : string|null = null
-
- The user to fetch the timezone for (defaults to current user)