Timezone
class Timezone (View source)
Helper class to work with database time zones.
Properties
protected Connection | $connection | The database connection. |
|
protected Date | $dateHelper | The date date. |
|
private array|null | $databaseTimestamps | Cache the result of getDatabaseTimestamps. |
|
private string|null | $databaseTimezoneName | Cache the result of getDatabaseTimezoneName(). |
Methods
Get a list of time zones that are compatible with the database.
Check if a PHP time zone is compatible with the database timezone.
Get a textual representation of the result of getDeltaTimezone().
Get a list of date/times checked against the database.
Get the database time zone name (example: 'SYSTEM').
Details
__construct(Connection $connection, Date $dateHelper)
Inizialize the instance.
array
getCompatibleTimezones()
Get a list of time zones that are compatible with the database.
null|array
getDeltaTimezone(DateTimeZone|string $phpTimezone)
Check if a PHP time zone is compatible with the database timezone.
string
describeDeltaTimezone(array $deltaTimezone)
Get a textual representation of the result of getDeltaTimezone().
protected array
getDatabaseTimestamps()
Get a list of date/times checked against the database.
string|null
getDatabaseTimezoneName()
Get the database time zone name (example: 'SYSTEM').