mozilla
Your Search Results

    Date.prototype.getTimezoneOffset()

    概要

    UTCと現在のロケール時間との差を分単位で返します。

    構文

    dateObj.getTimezoneOffset() 

    引数

    無し

    説明

    The time-zone offset is the difference, in minutes, between UTC and local time. Note that this means that the offset is positive if the local timezone is behind UTC and negative if it is ahead.  For example, if your time zone is UTC+10 (Australian Eastern Standard Time), -600 will be returned. Daylight savings time prevents this value from being a constant even for a given locale

    Example: Using getTimezoneOffset

    var x = new Date();
    var currentTimeZoneOffsetInHours = x.getTimezoneOffset() / 60;
    

    ドキュメントのタグと貢献者

    タグ: 
    Contributors to this page: teoli, ethertank, hateka
    最終更新者: teoli,
    サイドバーを隠す