Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/complaindate/utils/localTimezone.ts>localTimezone

JavaScript date-time utilities that keeps timezones on the surface
Go to Latest
function localTimezone
import { localTimezone } from "https://deno.land/x/complaindate@v0.7.2/utils/localTimezone.ts";

Get the name of the system timezone, and fallback to "UTC" if the system doesn't expose a timezone.

This is useful for setting the initial value of an HTML input where the user enters their timezone, or in a UI where the user has no option of selecting a preferred timezone.

Returns

string