How to update Grafana to am/pm time

Super new to HA and Grafana. I can’t figure out how to change my charts to display time in 12 hour format. It’s defaults to 24 hours. From what I can see I have to update grafana.ini with the following but I can’t find grafana.ini anywhere. Thanks for helping a newbie out!

[date_formats]
full_date = MMM Do, YYYY @ hh:mm:ss a
interval_second = hh:mm:ss a
interval_minute = hh:mm a
interval_hour = MMM DD hh:mm a
interval_day = MMM DD
interval_month = YYYY-MM
interval_year = YYYY

Assuming you’re using the HA add-on, the add-on’s configuration can define the date formats in “env_vars”. As in “Settings > Add-ons > Grafana > Confirguration”. Mine are set to:

- name: GF_DATE_FORMATS_FULL_DATE
  value: MMM Do, YYYY @ hh:mm:ss a
- name: GF_DATE_FORMATS_INTERVAL_SECOND
  value: hh:mm:ss a
- name: GF_DATE_FORMATS_INTERVAL_MINUTE
  value: hh:mm a
- name: GF_DATE_FORMATS_INTERVAL_HOUR
  value: MMM DD hh:mm a
- name: GF_DATE_FORMATS_INTERVAL_DAY
  value: DD/MM
- name: GF_DATE_FORMATS_INTERVAL_MONTH
  value: YYYY-MM

As I recall, I customised the second last one to ‘DD/MM’.

2 Likes