Open Monograph Press  3.3.0
PhpXmlRpc\Helper\Date Class Reference

Static Public Member Functions

static iso8601Decode ($idate, $utc=0)
 
static iso8601Encode ($timet, $utc=0)
 

Detailed Description

Definition at line 5 of file Date.php.

Member Function Documentation

◆ iso8601Decode()

static PhpXmlRpc\Helper\Date::iso8601Decode (   $idate,
  $utc = 0 
)
static

Given an ISO8601 date string, return a timet in the localtime, or UTC.

Parameters
string$idate
int$utceither 0 or 1
Returns
int (datetime)

Definition at line 50 of file Date.php.

Referenced by PhpXmlRpc\Encoder\decode().

◆ iso8601Encode()

static PhpXmlRpc\Helper\Date::iso8601Encode (   $timet,
  $utc = 0 
)
static

Given a timestamp, return the corresponding ISO8601 encoded string.

Really, timezones ought to be supported but the XML-RPC spec says:

"Don't assume a timezone. It should be specified by the server in its documentation what assumptions it makes about timezones."

These routines always assume localtime unless $utc is set to 1, in which case UTC is assumed and an adjustment for locale is made when encoding

Parameters
int$timet(timestamp)
int$utc(0 or 1)
Returns
string

Definition at line 25 of file Date.php.


The documentation for this class was generated from the following file: