I would like to change the time format in Grafana from e.g. MM/DD
to DD.MM
. However, I do not succeed.
My environment:
- Ubuntu 22.04.4 LTS aarch64
- Grafana server version 10.4.2
- Influx and Prometheus as data source
- Time zone: CEST (UTC+2)
Steps to reproduce:
- Install Grafana in the above version
- Make the following changes in
/etc/grafana/grafana.ini
under[date_formats]
[date_formats]
# For information on what formatting patterns that are supported https://momentjs.com/docs/#/displaying/
# Default system date format used in time range picker and other places where full time is displayed
full_date = DD.MM.YYYY HH:mm:ss
# Used by graph and other places where we only show small intervals
interval_second = HH:mm:ss
interval_minute = HH:mm
interval_hour = DD. HH:mm
interval_day = DD.MM
interval_month = MM/YYYY
interval_year = YYYY
# Experimental feature
use_browser_locale = true
# Default timezone for user preferences. Options are 'browser' for the browser local timezone or a timezone name from IANA Time Zone database, e.g. 'UTC' or 'Europe/Amsterdam' etc.
default_timezone = browser
- Restart Grafana using
service grafana-server restart
.
Expected result:
In all dashboards, the new time format is used both on the X-axes of graphs, but also in e.g. the time range selection window at the top right.
Actual result:
-
The new time format is displayed correctly in the Grafana settings under
domain/admin/settings/
→[date_formats]
. -
However, the old time format (e.g.
MM/DD
instead ofDD.MM
) is still visible in dashboards (both externally imported and self-created) and my settings are not applied anywhere.
Screenshot of Graph showing default date format on x-Axis
Since the “Settings” in the Grafana settings is only a visual representation of grafana.ini
, I assume that there is no configuration issue and that Grafana reads my new time format correctly, but does not apply it to the dashboards.
Screenshot of the Grafana Settings Tab (Home/Administration/General/Settings)
Since we have a lot of dashboards, it is no option for us to define a separate time format using overrides for each visualization.
Hence, my question: How is it possible to apply the new time format to the dashboards or where can the error possibly be, since Grafana obviously recognizes the new time format but does not apply it.
Note, that I also posted this Question to ServerFault (ahttps://serverfault.com/q/1158135/615528), but as we obtained no answer, we thought that here, we might be more lucky. The “a” being because I’m not allowed to post more than two links…