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"}



(Required) Location name (as defined by your operating system timezone database).

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.