This is documentation for the next version of Grafana. For the latest stable release, go to the latest version.

API Reference@grafana/datagetTimeZone

getTimeZone variable

getTimeZone variable

Used to get the current selected time zone. If a valid time zone is passed in the options it will be returned. If no valid time zone is passed either the time zone configured for the user account will be returned or the default for Grafana.

Signature

getTimeZone: <T extends TimeZoneOptions>(options?: T | undefined) => TimeZone

Import

import { getTimeZone } from '@grafana/data';