update : 2015.11.03
php.shukuma.com검색:
|
DateTimeZone::__constructtimezone_open(PHP 5 >= 5.2.0, PHP 7) DateTimeZone::__construct -- timezone_open — Creates new DateTimeZone object 설명객체 기반 형식
public DateTimeZone::__construct
( string
$timezone
)절차식 형식 Creates new DateTimeZone object. 반환값
Returns DateTimeZone on success.
절차식 형식은 실패시 오류/예외This method throws Exception if the timezone supplied is not recognised as a valid timezone. 예제
Example #1 Catching errors when instantiating DateTimeZone
<?php 위 예제의 출력: DateTimeZone::__construct() [datetimezone.--construct]: Unknown or bad timezone (Mars/Phobos) DateTimeZone::__construct() [datetimezone.--construct]: Unknown or bad timezone (Jupiter/Europa) |