PHP Conference Japan 2024

IntlTimeZone::getOffset

intltz_get_offset

(PHP 5 >= 5.5.0,PHP 7,PHP 8,PECL >= 3.0.0a1)

IntlTimeZone::getOffset -- intltz_get_offset取得給定時間點的時區原始偏移量和 GMT 偏移量

說明

物件導向風格 (方法)

public IntlTimeZone::getOffset(
    float $timestamp,
    bool $local,
    int &$rawOffset,
    int &$dstOffset
): bool

程序風格

intltz_get_offset(
    IntlTimeZone $timezone,
    float $timestamp,
    bool $local,
    int &$rawOffset,
    int &$dstOffset
): bool

警告

此函數目前沒有文件說明;僅提供其參數列表。

參數

timestamp

local

rawOffset

dstOffset

回傳值

新增筆記

使用者貢獻筆記 1 筆筆記

0
匿名
6 年前
/**
* 函式 IntlTimeZone::getOffset()
* @link http://icu-project.org/apiref/icu4c/classicu_1_1TimeZone.html#afcbc1c48bf0b453b0123c4cb75d20e96
* @param float $date
* 要返回偏移量的時間點,單位為自
* 1970 年 1 月 1 日 0:00 GMT 起算的毫秒數,取決於
* `local',可以是 GMT 時間或本地牆上時間。
* @param bool $local
* 如果為 true,則 `date` 為本地牆上時間;否則為 GMT 時間。
* @param int &$rawOffset
* 接收原始偏移量的輸出參數,即不包含
* DST 調整的偏移量
* @param int &$dstOffset
* 接收 DST 偏移量的輸出參數,即要加到
* `rawOffset` 以取得本地時間和 GMT 時間之間的總偏移量。如果
* DST 未生效,則此值為零;否則為正值,
* 通常為一小時。
*/
To Top