略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: IntlTimeZone::getOffset

2024-11-13

IntlTimeZone::getOffset

intltz_get_offset

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

IntlTimeZone::getOffset -- intltz_get_offsetGet the time zone raw and GMT offset for the given moment in time

说明

面向对象风格 (method):

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

返回值

add a noteadd a note

User Contributed Notes 1 note

up
0
Anonymous
3 years ago
/**
* Function IntlTimeZone::getOffset()
* @link http://icu-project.org/apiref/icu4c/classicu_1_1TimeZone.html#afcbc1c48bf0b453b0123c4cb75d20e96
* @param float $date
*   moment in time for which to return offsets, in units of milliseconds from
*   January 1, 1970 0:00 GMT, either GMT time or local wall time, depending on
*   `local'.
* @param bool $local
*   if true, `date' is local wall time; otherwise it is in GMT time.
* @param int &$rawOffset
*   output parameter to receive the raw offset, that is, the offset not
*   including DST adjustments
* @param int &$dstOffset
*   output parameter to receive the DST offset, that is, the offset to be added
*   to `rawOffset' to obtain the total offset between local and GMT time. If
*   DST is not in effect, this value is zero; otherwise it is a positive value,
*   typically one hour.
*/

官方地址:https://www.php.net/manual/en/intltimezone.getoffset.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3