$getNativeTimeZoneId
Retrieve the local system's current timezone identifier.
$getNativeTimeZoneId()
Retrieves the IANA timezone identifier for the local system's current timezone.
Signature
$getNativeTimeZoneId(): TimeZoneIdNativeReturn Type
TimeZoneIdNative- The local system's IANA timezone identifier
Example
playground.ts
Remarks
- Always returns the local machine's timezone identifier regardless of whether
timeZone(),utc(), ortoUTC()methods have been applied - For modified instances, use the
timeZoneIdpublic property instead to get the current instance's timezone context - Directly accesses
Intl.DateTimeFormat().resolvedOptions().timeZonefor the system identifier - Returns standardized IANA timezone identifiers (e.g.,
"Asia/Dhaka","America/New_York")
Usage Notes
playground.ts
Last updated: Thu, May 21, 2026 03:51:36PM (UTC)
