Differences Between: [Versions 401 and 403]
(no description)
File Size: | 64 lines (2 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
Date:: (2 methods):
iso8601Encode()
iso8601Decode()
iso8601Encode($timet, $utc = 0) X-Ref |
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 param: int|\DateTimeInterface $timet timestamp or datetime param: bool|int $utc (0 or 1) return: string |
iso8601Decode($idate, $utc = 0) X-Ref |
Given an ISO8601 date string, return a timestamp in the localtime, or UTC. param: string $idate param: bool|int $utc either 0 (assume date is in local time) or 1 (assume date is in UTC) return: int (timestamp) 0 if the source string does not match the xml-rpc dateTime format |