Menu

## ActionScheduler_DateTime extends DateTime
in package

ActionScheduler_DateTime.php : 8

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

ActionScheduler_DateTime.php : 18

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()

ActionScheduler_DateTime.php : 48

Returns the timezone offset.

`public getOffset() : int`

##### Tags

link
  http://php.net/manual/en/datetime.getoffset.php

##### Return values

int —

#### getOffsetTimestamp()

ActionScheduler_DateTime.php : 73

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

`public getOffsetTimestamp() : int`

##### Tags

since
  3.0.0

##### Return values

int —

#### getTimestamp()

ActionScheduler_DateTime.php : 27

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()

ActionScheduler_DateTime.php : 60

Set the TimeZone associated with the DateTime

`public setTimezone(DateTimeZone $timezone) : static`

##### Parameters

$timezone : DateTimeZone

##### Tags

link
  http://php.net/manual/en/datetime.settimezone.php

##### Return values

static —

#### setUtcOffset()

ActionScheduler_DateTime.php : 38

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