Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (TimezoneInterface $localeDate) | |
calculateOffset ($timezone=null) | |
gmtDate ($format=null, $input=null) | |
date ($format=null, $input=null) | |
gmtTimestamp ($input=null) | |
timestamp ($input=null) | |
getGmtOffset ($type='seconds') | |
Protected Attributes | |
$_localeDate | |
__construct | ( | TimezoneInterface | $localeDate | ) |
TimezoneInterface | $localeDate |
Definition at line 32 of file DateTime.php.
calculateOffset | ( | $timezone = null | ) |
Calculates timezone offset
string | null | $timezone |
Definition at line 44 of file DateTime.php.
date | ( | $format = null , |
|
$input = null |
|||
) |
Converts input date into date with timezone offset Input date must be in GMT timezone
string | $format | |
int | string | $input | date in GMT timezone |
Definition at line 89 of file DateTime.php.
getGmtOffset | ( | $type = 'seconds' | ) |
Get current timezone offset in seconds/minutes/hours
string | $type |
Definition at line 159 of file DateTime.php.
gmtDate | ( | $format = null , |
|
$input = null |
|||
) |
Forms GMT date
string | $format | |
int | string | $input | date in current timezone |
Definition at line 68 of file DateTime.php.
gmtTimestamp | ( | $input = null | ) |
Forms GMT timestamp
int | string | \DateTimeInterface | $input | date in current timezone |
Definition at line 104 of file DateTime.php.
timestamp | ( | $input = null | ) |
Converts input date into timestamp with timezone offset Input date must be in GMT timezone
int | string | $input | date in GMT timezone |
Definition at line 132 of file DateTime.php.
|
protected |
Definition at line 27 of file DateTime.php.