MongoDB\BSON\UTCDatetime::__construct

(mongodb >=1.0.0)

MongoDB\BSON\UTCDatetime::__constructDescription

Опис

final public MongoDB\BSON\UTCDatetime::__construct ( string $milliseconds )

Параметри

milliseconds

Значення, що повертаються

Помилки/Винятки

Приклади

Приклад #1 MongoDB\BSON\UTCDatetime::__construct() example

<?php

/* ... */

?>

Наведений вище приклад виведе щось подібне до:

...

Прогляньте Також

add a note add a note

User Contributed Notes 3 notes

up
1
0xff00ff at gmail dot com
7 years ago
$utcdatetime = new MongoDB\BSON\UTCDateTime($unixtimestamp * 1000);
up
1
jesperbendtsen83 at gmail dot com
8 years ago
For me to get it work with php 5.6 on an iis 7.5, it had to be a string

$utcdatetime = new MongoDB\BSON\UTCDateTime('1416445411987');
up
-2
jesperbendtsen83 at gmail dot com
8 years ago
The problem with integer => string is only on 32 bit systems
To Top