1 | <?php |
||
23 | class MongoDate implements TypeInterface |
||
24 | { |
||
25 | /** |
||
26 | * @link http://php.net/manual/en/class.mongodate.php#mongodate.props.sec |
||
27 | * @var int $sec |
||
28 | */ |
||
29 | public $sec; |
||
30 | |||
31 | /** |
||
32 | * @link http://php.net/manual/en/class.mongodate.php#mongodate.props.usec |
||
33 | * @var int $usec |
||
34 | */ |
||
35 | public $usec; |
||
36 | |||
37 | /** |
||
38 | * Creates a new date. If no parameters are given, the current time is used. |
||
39 | * |
||
40 | * @link http://php.net/manual/en/mongodate.construct.php |
||
41 | * @param int $sec Number of seconds since January 1st, 1970 |
||
42 | * @param int $usec Microseconds |
||
43 | */ |
||
44 | public function __construct($sec = 0, $usec = 0) |
||
60 | |||
61 | /** |
||
62 | * Returns a string representation of this date |
||
63 | * @return string |
||
64 | */ |
||
65 | public function __toString() |
||
69 | |||
70 | /** |
||
71 | * Converts this MongoDate to the new BSON UTCDateTime type |
||
72 | * |
||
73 | * @return UTCDateTime |
||
74 | * @internal This method is not part of the ext-mongo API |
||
75 | */ |
||
76 | public function toBSONType() |
||
82 | |||
83 | /** |
||
84 | * Returns a DateTime object representing this date |
||
85 | * @link http://php.net/manual/en/mongodate.todatetime.php |
||
86 | * @return DateTime |
||
87 | */ |
||
88 | public function toDateTime() |
||
102 | |||
103 | /** |
||
104 | * @param int $usec |
||
105 | * @return int |
||
106 | */ |
||
107 | private function truncateMicroSeconds($usec) |
||
111 | } |
||
112 |