Pebble App Framework: Phone API
    Preparing search index...

    Function phoneZone

    • The phone's own time zone name, when the runtime can name it and read it right.

      A runtime with no locale data cannot build the formatter this needs, so it is checked for first and this answers null. A runtime that answers UTC while the phone is not on UTC would put every sun time and forecast hour off, so the name is only trusted when its offset now matches the phone clock's own.

      Parameters

      • nowMs: number

        The moment to check the offset at, as epoch milliseconds.

      Returns string | null

      The zone name, such as "America/Toronto", or null when it cannot be trusted.