DateTime::getOffsetDateTimeImmutable::getOffsetDateTimeInterface::getOffsetdate_offset_getReturns the timezone offset BeschreibungObjektorientierter Stil
public int DateTime::getOffset
( void
)
public int DateTimeImmutable::getOffset
( void
)
public int DateTimeInterface::getOffset
( void
)
Prozeduraler Stil
int date_offset_get
( DateTimeInterface
$object
)Returns the timezone offset. Parameter-Liste
Rückgabewerte
Returns the timezone offset in seconds from UTC on success
Im Fehlerfall wird BeispieleBeispiel #1 DateTime::getOffset example Objektorientierter Stil
<?phpProzeduraler Stil
<?phpDie obigen Bespiele erzeugen folgende Ausgabe: -18000 -14400 Note: -18000 = -5 hours, -14400 = -4 hours. |