Datetime variables apply timezone inconsistently

  • What Grafana version and what operating system are you using?
    9.4.7. Docker on WSL.

I’m trying to use hour’s part of datetime variable in query, like this ${__from:date:HH}. It returns hours in timezone local to my browser.

But ${__from:date} or ${__from:date:iso}returns date in UTC.

I expect them to behave similarly, either both UTC, or both local. Or at least clear indication of behavior specifics at the documentation.

Also, same behavior is happening to any custom variable containing timestamp.

Screenshot from 2023-05-17 00-42-46

Found to be issue/expected behavior of formatting.

There are issue and discussion about this (both in status feature request at moment of this answer).

1 Like