Class DateTimeResult
- DateTime implements DateTimeInterface
-
Aws\Api\DateTimeResult implements JsonSerializable
- Namespace: Aws\Api
- Located at Api/DateTimeResult.php
DateTime overrides that make DateTime work more seamlessly as a string, with JSON documents, and with JMESPath.
Methods Summary
-
static
fromEpoch ( $unixTimestamp )
Create a new DateTimeResult from a unix timestamp. The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT).
- static fromISO8601 ( $iso8601Timestamp )
-
static
fromTimestamp ( $timestamp, $expectedFormat = null )
Create a new DateTimeResult from an unknown timestamp.
-
__toString ( )
Serialize the DateTimeResult as an ISO 8601 date string.
- jsonSerialize ( )
Methods inherited from DateTime
__construct()
,
__set_state()
,
__wakeup()
,
add()
,
createFromFormat()
,
diff()
,
format()
,
getLastErrors()
,
getOffset()
,
getTimestamp()
,
getTimezone()
,
modify()
,
setDate()
,
setISODate()
,
setTime()
,
setTimestamp()
,
setTimezone()
,
sub()
Methods Details
static
Aws\Api\DateTimeResult
fromEpoch (
$unixTimestamp
)
Create a new DateTimeResult from a unix timestamp. The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT).
Returns
Aws\Api\DateTimeResult |
Exceptions
Exception |
static
Aws\Api\DateTimeResult
fromISO8601 (
$iso8601Timestamp
)
Returns
Aws\Api\DateTimeResult |
static
Aws\Api\DateTimeResult
fromTimestamp (
$timestamp,
$expectedFormat = null
)
Create a new DateTimeResult from an unknown timestamp.
Returns
Aws\Api\DateTimeResult |
Exceptions
Exception |
string __toString ( )
Serialize the DateTimeResult as an ISO 8601 date string.
Returns
string |
jsonSerialize ( )
Implementation of
JsonSerializable::jsonSerialize()
Constants summary
Constants inherited from DateTime
ATOM
,
COOKIE
,
ISO8601
,
RFC1036
,
RFC1123
,
RFC2822
,
RFC3339
,
RFC822
,
RFC850
,
RSS
,
W3C