From 261ba03efee651ea49eca5b5269e396573f6be19 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Wed, 24 May 2023 21:35:11 +0100 Subject: [PATCH] [v10.0.x] Edit global time variable - custom date formats use browser time (#69021) Edit global time variable - custom date formats use browser time (#69016) * Edit global time variable - custom date formats use browser time Fixes https://github.com/grafana/grafana/issues/68748 * run prettier --------- Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com> (cherry picked from commit 7c2358862e5f09e8e2f64eca4ccd191d483b84c7) Co-authored-by: Melori Arellano --- .../variables/add-template-variables/index.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/sources/dashboards/variables/add-template-variables/index.md b/docs/sources/dashboards/variables/add-template-variables/index.md index deda7868f77..23295926909 100644 --- a/docs/sources/dashboards/variables/add-template-variables/index.md +++ b/docs/sources/dashboards/variables/add-template-variables/index.md @@ -247,13 +247,13 @@ Grafana has two built-in time range variables: `$__from` and `$__to`. They are c > **Note:** This special formatting syntax is only available in Grafana 7.1.2+ -| Syntax | Example result | Description | -| ------------------------ | ------------------------ | --------------------------------------------------------------------------------------------------------- | -| `${__from}` | 1594671549254 | Unix millisecond epoch | -| `${__from:date}` | 2020-07-13T20:19:09.254Z | No args, defaults to ISO 8601/RFC 3339 | -| `${__from:date:iso}` | 2020-07-13T20:19:09.254Z | ISO 8601/RFC 3339 | -| `${__from:date:seconds}` | 1594671549 | Unix seconds epoch | -| `${__from:date:YYYY-MM}` | 2020-07 | Any custom [date format](https://momentjs.com/docs/#/displaying/) that does not include the `:` character | +| Syntax | Example result | Description | +| ------------------------ | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `${__from}` | 1594671549254 | Unix millisecond epoch | +| `${__from:date}` | 2020-07-13T20:19:09.254Z | No args, defaults to ISO 8601/RFC 3339 | +| `${__from:date:iso}` | 2020-07-13T20:19:09.254Z | ISO 8601/RFC 3339 | +| `${__from:date:seconds}` | 1594671549 | Unix seconds epoch | +| `${__from:date:YYYY-MM}` | 2020-07 | Any custom [date format](https://momentjs.com/docs/#/displaying/) that does not include the `:` character. Uses browser time. Use `:date` or `:date:iso` for UTC | The syntax above also works with `${__to}`.