|
static | iso8601Decode ($idate, $utc=0) |
| Given an ISO8601 date string, return a timestamp in the localtime, or UTC.
|
|
static | iso8601Encode ($timet, $utc=0) |
| Given a timestamp, return the corresponding ISO8601 encoded string.
|
|
◆ iso8601Decode()
static PhpXmlRpc\Helper\Date::iso8601Decode |
( |
| $idate, |
|
|
| $utc = 0 ) |
|
static |
Given an ISO8601 date string, return a timestamp in the localtime, or UTC.
- Parameters
-
string | $idate | |
bool | int | $utc | either 0 (assume date is in local time) or 1 (assume date is in UTC) |
- Return values
-
int | (timestamp) 0 if the source string does not match the xml-rpc dateTime format |
◆ 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."
This routine always encodes to local time unless $utc is set to 1, in which case UTC output is produced and an adjustment for the local timezone's offset is made
- Parameters
-
int | DateTimeInterface | $timet | timestamp or datetime |
bool | int | $utc | (0 or 1) |
- Return values
-
The documentation for this class was generated from the following file:
- lib/phpxmlrpc/Helper/Date.php