PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

MongoDB\BSON\UTCDateTime::toDateTime - Returns the DateTime representation of this UTCDateTime | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

MongoDB\BSON\UTCDateTime::toDateTime

(mongodb >=1.0.0)

MongoDB\BSON\UTCDateTime::toDateTimeReturns the DateTime representation of this UTCDateTime

説明

final public DateTime MongoDB\BSON\UTCDateTime::toDateTime ( void )

パラメータ

この関数にはパラメータはありません。

返り値

Returns the DateTime representation of this UTCDateTime. The returned DateTime will use the UTC time zone.

エラー / 例外

例1 MongoDB\BSON\UTCDatetime::toDateTime() example

<?php

$utcdatetime 
= new MongoDB\BSON\UTCDateTime(1416445411987);
$datetime $utcdatetime->toDateTime();
var_dump($datetime->format('r'));
var_dump($datetime->format('U.u'));
var_dump($datetime->getTimezone());

?>

上の例の出力は、 たとえば以下のようになります。

string(31) "Thu, 20 Nov 2014 01:03:31 +0000"
string(17) "1416445411.987000"
object(DateTimeZone)#3 (2) {
  ["timezone_type"]=>
  int(1)
  ["timezone"]=>
  string(6) "+00:00"
}

忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「MongoDB\BSON\UTCDateTime::toDateTime - Returns the DateTime representation of this UTCDateTime」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | MongoDB\BSON\UTCDateTime::toDateTime - Returns the DateTime representation of this UTCDateTime」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: