Свойство | Тип | Описание | |
---|---|---|---|
$mongoDate | MongoDB\BSON\UTCDateTime | ||
$timestamp | integer |
Метод | Описание | |
---|---|---|
__call ( string $method, array $args = [] ) : mixed | A wrapper to use this class as MongoUTCDateTime. | |
__construct ( integer | MongoDB\BSON\UTCDateTime | null $datetime = null ) | Constructor. | |
__toString ( ) : string | Allows casting to string utilizing drivers UTCDateTime implementation. | |
convert ( ) : MongoDB\BSON\UTCDateTime | ||
jsonSerialize ( ) : string | ||
serialize ( ) : string | ||
toLocalDateTime ( ) : DateTime | Retrieve a DateTime object with proper timezone set. | |
unserialize ( mixed $data ) : void |
Метод | Описание | |
---|---|---|
init ( integer | MongoDB\BSON\UTCDateTime | null $datetime ) : boolean | Initializes timestamp and mongoDate variables. |
public __construct ( integer | MongoDB\BSON\UTCDateTime | null $datetime = null ) | ||
$datetime | integer | MongoDB\BSON\UTCDateTime | null | MongoUTCDateTime or Timestamp to wrap. If it was null, uses current timestamp. |
public __toString ( ) : string | ||
Результат | string | Returns the string representation of this UTCDateTime. |
public convert ( ) : MongoDB\BSON\UTCDateTime | ||
Результат | MongoDB\BSON\UTCDateTime |
public toLocalDateTime ( ) : DateTime | ||
Результат | DateTime |
public unserialize ( mixed $data ) : void | ||
$data | mixed | Serialized string to parse. |
Результат | void |
protected UTCDateTime,MongoDB\BSON $mongoDate | ||
Результат | MongoDB\BSON\UTCDateTime |