996 B
996 B
title | description | menu | weight | flux/v0.x/tags | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
timezone.location() function | `timezone.location()` loads a timezone based on a location name. |
|
101 |
|
timezone.location()
constructs a timezone record based on a specific location.
Setting the timezone by location accounts for location-based time shifts in the
clock such as daylight savings time or summertime.
Flux uses the timezone database provided by the underlying operating system (OS). Timezones and timezone names depend on your OS. For a general list of timezone names, see tz database time zones.
import "timezone"
timezone.location(name: "America/Los_Angeles")
// Returns {offset: 0ns, zone: "America/Los_Angeles"}
Parameters
name
({{< req >}}) Location name (as defined by your operating system timezone database).