Documentation

ActionScheduler_DateTime extends DateTime
in package

ActionScheduler DateTime class.

This is a custom extension to DateTime that

Table of Contents

$utcOffset  : int
UTC offset.
getOffset()  : int
Returns the timezone offset.
getOffsetTimestamp()  : int
Get the timestamp with the WordPress timezone offset added or subtracted.
getTimestamp()  : int
Get the unix timestamp of the current object.
setTimezone()  : static
Set the TimeZone associated with the DateTime
setUtcOffset()  : mixed
Set the UTC offset.

Properties

$utcOffset

UTC offset.

protected int $utcOffset = 0

Only used when a timezone is not set. When a timezone string is used, this will be set to 0.

Methods

getOffsetTimestamp()

Get the timestamp with the WordPress timezone offset added or subtracted.

public getOffsetTimestamp() : int
Tags
since
3.0.0
Return values
int

getTimestamp()

Get the unix timestamp of the current object.

public getTimestamp() : int

Missing in PHP 5.2 so just here so it can be supported consistently.

Return values
int

setUtcOffset()

Set the UTC offset.

public setUtcOffset( $offset) : mixed

This represents a fixed offset instead of a timezone setting.

Parameters
$offset :
Return values
mixed

Search results