getZonedSecond
Signature
Section titled “Signature”getZonedSecond(ianaTimezone: string): stringimport { getZonedSecond } from "@northguild/gmt/zoned/get";Return the current second for the specified IANA timeZone.
- Uses Temporal.Now.zonedDateTimeISO to get the current time.
- Validation is performed on the timezone.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
ianaTimezone |
string |
IANA timeZone identifier |
Returns
Section titled “Returns”current second string (zero-padded to 2 digits) or “” on invalid input
Examples
Section titled “Examples”getZonedSecond("America/New_York") // "00"getZonedSecond("invalid") // ""