class MongoDate (View source)

Properties

int $sec
int $usec

Methods

__construct(int $sec = 0, int $usec = 0)

Creates a new date. If no parameters are given, the current time is used.

toDateTime()

Returns a DateTime object representing this date

string
__toString()

Returns a string representation of this date

Details

__construct(int $sec = 0, int $usec = 0)

Creates a new date. If no parameters are given, the current time is used.

Parameters

int $sec

Number of seconds since January 1st, 1970

int $usec Microseconds

DateTime toDateTime()

Returns a DateTime object representing this date

Return Value

DateTime

string __toString()

Returns a string representation of this date

Return Value

string