function localToUtc
localToUtc(
naive: string,
tz: string,
): string

Convert a naive datetime-local value (YYYY-MM-DDTHH:MM) to a UTC ISO string, interpreting the value as local time in the given timezone.

Uses 'compatible' disambiguation: spring-forward gaps resolve to the later (post-transition) time; fall-back overlaps resolve to the earlier occurrence.

Parameters

naive: string
tz: string

Return Type

string

Usage

import { localToUtc } from "doc.ts";