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
getOffset()
Returns the timezone offset.
public
getOffset() : int
Tags
Return values
int —getOffsetTimestamp()
Get the timestamp with the WordPress timezone offset added or subtracted.
public
getOffsetTimestamp() : int
Tags
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 —setTimezone()
Set the TimeZone associated with the DateTime
public
setTimezone(DateTimeZone $timezone) : static
Parameters
- $timezone : DateTimeZone
Tags
Return values
static —setUtcOffset()
Set the UTC offset.
public
setUtcOffset( $offset) : mixed
This represents a fixed offset instead of a timezone setting.