timezone.location() function
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
(Required) Location name (as defined by your operating system timezone database).
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Flux and this documentation. To find support, the following resources are available:
InfluxDB Cloud customers can contact InfluxData Support.