Function zonedWallClockToUtcSeconds

  • Wall-clock components in zone → UTC seconds.

    Two passes because the offset we need is the one in force at the answer, not at the guess: on a DST changeover day the first pass can land an hour out, and the second pass corrects it. A wall time that a spring-forward skipped has no exact answer; this settles on the instant one offset-step later, which is the same choice Date makes.

    Parameters

    • year: number
    • month: number
    • day: number
    • hour: number = 0
    • minute: number = 0
    • second: number = 0
    • zone: string = DEFAULT_TIMEZONE

    Returns number