« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 28 for setTimeZone (0.001 sec.)
IntlDateFormatter::setTimeZone — タイムゾーンを設定する | PHP 8.3 12863
IntlDateFormatter::setTimeZone datefmt_set_timezone (PHP 5 >= 5.5.0, PHP 7, PHP 8, PECL intl >= 3.0.0) IntlDateFormatter::setTimeZone -- datefmt_set_timezone — タイムゾーンを設定する 説明 オブジェクト指向型 public function IntlDateFormatter ... ::setTimeZone ( IntlTimeZone | DateTimeZone | string | null $timezone ): bool 手続き型 function datefmt_set_timezone ( IntlDateFormatter ... この関数は、 true を返すようになりました。 これより前のバージョンでは、 null を返していました。 例 例1 IntlDateFormatter::setTimeZone() の例 <?php ini_set ( 'date.timezone' , 'Europe/Amsterdam' ); $formatter = IntlDateFormatter :: create ( NULL , NULL , NU ... LL , "UTC" ); $formatter -> setTimeZone ( NULL ); echo "NULL\n " , $formatter -> getTimeZone ()-> getId (), "\n" ; $formatter -> setTimeZone ( IntlTimeZone :: cre ...
https://man.mtool.work/php/8.3/intldateformatter.settimezone.html
DateTimeImmutable::setTimezone — タイムゾーンを設定する | PHP 8.3 12044
DateTimeImmutable::setTimezone (PHP 5 >= 5.5.0, PHP 7, PHP 8) DateTimeImmutable::setTimezone — タイムゾーンを設定する 説明 #[ \NoDiscard ( message : "as DateTimeImmutable::setTimezone() does not modify the object itself" )] public function ... DateTimeImmutable::setTimezone ( DateTimeZone $timezone ): DateTimeImmutable 新しいタイムゾーンを設定した、 新しい DateTimeImmutable オブジェクトを返しま ... imeImmutable オブジェクトを返します。 このメソッドをコールした際に指していた時刻は変わりません。 例 例1 DateTimeImmutable::setTimeZone() の例 オブジェクト指向型 <?php $date = new DateTimeImmutable ( '2000-01-01' , new DateTimeZone ( 'Pacific/Nauru' )); echo ... $date -> format ( 'Y-m-d H:i:sP' ) . "\n" ; $newDate = $date -> setTimezone (new DateTimeZone ( 'Pacific/Chatham' )); echo $newDate -> format ( 'Y-m-d H:i:sP' ) . "\n" ; ?> 上の例の出力は以下となりま ...
https://man.mtool.work/php/8.3/datetimeimmutable.settimezone.html
DateTime::setTimezone — DateTime オブジェクトのタイムゾーンを設定する | PHP 8.3 11880
DateTime::setTimezone date_timezone_set (PHP 5 >= 5.2.0, PHP 7, PHP 8) DateTime::setTimezone -- date_timezone_set — DateTime オブジェクトのタイムゾーンを設定する 説明 オブジェクト指向型 public function DateTime::setTimezone ( DateTimeZone $ ... e $object , DateTimeZone $timezone ): DateTime 新しいタイムゾーンを DateTime オブジェクトに設定します。 DateTimeImmutable::setTimezone() に似ていますが、 DateTime を使って動作します。 手続き型のバージョンは、 DateTime オブジェクトを最初の引数に取ります。 パ ... うにするため、 DateTime オブジェクトを返します。 このメソッドをコールした際に指していた時刻は変わりません。 例 例1 DateTime::setTimeZone() の例 オブジェクト指向型 <?php $date = new DateTime ( '2000-01-01' , new DateTimeZone ( 'Pacific/Nauru' )); echo $date -> ... format ( 'Y-m-d H:i:sP' ) . "\n" ; $date -> setTimezone (new DateTimeZone ( 'Pacific/Chatham' )); echo $date -> format ( 'Y-m-d H:i:sP' ) . "\n" ; 上の例の出力は以下となります。 ...
https://man.mtool.work/php/8.3/datetime.settimezone.html
IntlCalendar::setTimeZone — このカレンダーで使うタイムゾーンを設定する | PHP 8.... 10913
IntlCalendar::setTimeZone (PHP 5 >= 5.5.0, PHP 7, PHP 8, PECL >= 3.0.0a1) IntlCalendar::setTimeZone — このカレンダーで使うタイムゾーンを設定する 説明 オブジェクト指向型 public function IntlCalendar::setTimeZone ( IntlTimeZone | DateTimeZone ... 08:30" などのオフセットも指定できます。 戻り値 成功時に true を返します。 失敗時に false を返します。 例 例1 IntlCalendar::setTimeZone() <?php ini_set ( 'date.timezone' , 'Europe/Lisbon' ); ini_set ( 'intl.default_locale' , 'es_ES' ); $cal = new IntlGregori ... Formatter :: formatObject ( $cal , IntlDateFormatter :: FULL ), "\n" ; echo "(instant { $cal -> getTime ()} )\n" ; $cal -> setTimeZone ( IntlTimeZone :: getGMT ()); echo IntlDateFormatter :: formatObject ( $cal , IntlDateFormatter :: FULL ), "\n" ; echo "(i ... nstant { $cal -> getTime ()} )\n" ; $cal -> setTimeZone ( 'GMT+03:33' ); echo IntlDateFormatter :: formatObject ( $cal , IntlDateFormatter :: FULL ), "\n" ; echo "(instant { $cal ...
https://man.mtool.work/php/8.3/intlcalendar.settimezone.html
date_timezone_set — DateTime::setTimezone() | PHP 8.3 9520
date_timezone_set (PHP 5 >= 5.2.0, PHP 7, PHP 8) date_timezone_set — DateTime::setTimezone() のエイリアス 説明 この関数は次の関数のエイリアスです。 DateTime::setTimezone() 他のマニュアルの関連ページ Python datetime Linux JM timezone(3) Pyth ...
https://man.mtool.work/php/8.3/function.date-timezone-set.html
IntlCalendar::getTimeZone — オブジェクトのタイムゾーンを取得する | PHP 8.3 8455
IntlCalendar::getTimeZone (PHP 5 >= 5.5.0, PHP 7, PHP 8, PECL >= 3.0.0a1) IntlCalendar::getTimeZone — オブジェクトのタイムゾーンを取得する 説明 オブジェクト指向型 public function IntlCalendar::getTimeZone (): IntlTimeZone | false 手続き型 f ... ( 'intl.default_locale' , 'en_US' ); $cal = IntlCalendar :: createInstance (); print_r ( $cal -> getTimeZone ()); $cal -> setTimeZone ( 'UTC' ); print_r ( $cal -> getTimeZone ()); $cal = IntlCalendar :: fromDateTime ( '2012-01-01 00:00:00 GMT+03:33' ); pri ... lTimeZone Object ( [valid] => 1 [id] => GMT+03:33 [rawOffset] => 12780000 [currentOffset] => 12780000 ) 参考 IntlCalendar::setTimeZone() - このカレンダーで使うタイムゾーンを設定する IntlCalendar::createInstance() - 新しい IntlCalendar を作成する IntlGregori ...
https://man.mtool.work/php/8.3/intlcalendar.gettimezone.html
DateTimeImmutable クラス | PHP 8.3 8373
DateTimeImmutable クラス (PHP 5 >= 5.5.0, PHP 7, PHP 8) はじめに 日付と時刻を表現します。 このクラスは DateTime と同じ振る舞いをします。 但し、 DateTime::modify() のような、 状態を変更して新しいオブジェクトを返すメソッドが呼び出された時を除 ... lf" )] public function setTimestamp ( int $timestamp ): DateTimeImmutable #[ \NoDiscard ( message : "as DateTimeImmutable::setTimezone() does not modify the object itself" )] public function setTimezone ( DateTimeZone $timezone ): DateTimeImmutable #[ \NoDi ... Time — 時刻を設定する DateTimeImmutable::setTimestamp — Unix タイムスタンプを用いて日付と時刻を設定する DateTimeImmutable::setTimezone — タイムゾーンを設定する DateTimeImmutable::sub — 年月日時分秒の値を引く 他のマニュアルの関連ページ Python datetime Linux ...
https://man.mtool.work/php/8.3/class.datetimeimmutable.html
日付・時刻 | PHP 8.3 7963
日付・時刻 はじめに DateTimeImmutable と、 それに関連するクラスを使うと、日付/時刻 に関する情報を表現できます。 このオブジェクトは、日付/時刻 の文字列表現か、 現在のシステム時刻から作成できます。 この情報を変更したり、 フォーマット化するため ... 定する DateTime::setTime — 時刻を設定する DateTime::setTimestamp — Unix タイムスタンプを用いて日付と時刻を設定する DateTime::setTimezone — DateTime オブジェクトのタイムゾーンを設定する DateTime::sub — 年月日時分秒の値を DateTime オブジェクトから引く DateTimeI ... Time — 時刻を設定する DateTimeImmutable::setTimestamp — Unix タイムスタンプを用いて日付と時刻を設定する DateTimeImmutable::setTimezone — タイムゾーンを設定する DateTimeImmutable::sub — 年月日時分秒の値を引く DateTimeInterface — DateTimeInterface インターフェ ... — DateTime::setTimestamp のエイリアス date_timezone_get — DateTime::getTimezone のエイリアス date_timezone_set — DateTime::setTimezone のエイリアス getdate — 日付/時刻情報を取得する gettimeofday — 現在の時間を得る gmdate — GMT/UTC の日付/時刻を書式化する gm ...
https://man.mtool.work/php/8.3/book.datetime.html
DateTime クラス | PHP 8.3 7881
DateTime クラス (PHP 5 >= 5.2.0, PHP 7, PHP 8) はじめに 日付と時刻を表現するクラスです。 このクラスは、 DateTimeImmutable と同じ振る舞いをします。 但し、 DateTime::modify() のような、 オブジェクトそのものを変更するメソッドが呼び出された時を ... t $second = 0 , int $microsecond = 0 ): DateTime public function setTimestamp ( int $timestamp ): DateTime public function setTimezone ( DateTimeZone $timezone ): DateTime public function sub ( DateInterval $interval ): DateTime public function diff ( DateT ... 定する DateTime::setTime — 時刻を設定する DateTime::setTimestamp — Unix タイムスタンプを用いて日付と時刻を設定する DateTime::setTimezone — DateTime オブジェクトのタイムゾーンを設定する DateTime::sub — 年月日時分秒の値を DateTime オブジェクトから引く 他のマニュ ...
https://man.mtool.work/php/8.3/class.datetime.html
IntlDateFormatter::format — 日付/時刻 の値を文字列としてフォーマットする | PHP ... 7799
IntlDateFormatter::format datefmt_format (PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL intl >= 1.0.0) IntlDateFormatter::format -- datefmt_format — 日付/時刻 の値を文字列としてフォーマットする 説明 オブジェクト指向型 public function IntlDateFormatter ... フォーマッターで設定されているタイムゾーンです。 渡したオブジェクトのタイムゾーンを使って欲しい場合は、 IntlDateFormatter::setTimeZone() を呼んでそのオブジェクトのタイムゾーンを設定しておかなければいけません。 あるいは、staticメソッド IntlDateFormatter::for ... rted/will start on:\n\t" , $formatter -> format ( $cal ), "\n" ; // フォーマッターのタイムゾーンを利用します $formatter -> setTimeZone ( 'Asia/Tokyo' ); echo "After changing timezone:\n\t" , $formatter -> format ( $cal ), "\n" ; 上の例の出力は以下となります ...
https://man.mtool.work/php/8.3/intldateformatter.format.html
PREV 1 2 3 NEXT