Timestamp
final class Timestamp implements Value (View source)
A PHP representation of the CQL timestamp
datatype
Methods
__construct(int $seconds, int $microseconds)
Creates a new timestamp from either unix timestamp and microseconds or from the current time by default.
int
time()
Unix timestamp.
float|string
microtime(bool $get_as_float)
Microtime from this timestamp
toDateTime()
Converts current timestamp to PHP DateTime.
string
__toString()
Returns a string representation of this timestamp.
Details
__construct(int $seconds, int $microseconds)
Creates a new timestamp from either unix timestamp and microseconds or from the current time by default.
Type
type()
The type of this timestamp.
int
time()
Unix timestamp.
float|string
microtime(bool $get_as_float)
Microtime from this timestamp
DateTime
toDateTime()
Converts current timestamp to PHP DateTime.
string
__toString()
Returns a string representation of this timestamp.