Different results Brave and Chrome vs. FF - timezone

Grafana Version: 9.2.3 (as Docker Container)
Grafana Host OS: Ubuntu 20.04.5
MariaDB Version: 10.5.15 (as Docker Container)
MariaDB Host OS: Ubuntu 22.04.1

I’m using the mysql datasource to query a mariadb database. If I use Firefox to query
the datasource, the reported times are correct. If I use Brave or Chrome (from the same
laptop), the reported times are 8 hours behind. My timezone is PST (UTC -8).

Here are some facts and some things I’ve tried to correct the issue:

  • The timezone of the host’s database is UTC.

  • I’m using the query builder to generate the table/graph. The query is simply this:
    SELECT timestamp, tempF FROM acuparse.temperature ORDER BY timestamp DESC

  • The data type of the timestamp in the database is timestamp

    mysql> desc temperature;
    ±----------±-----------±-----±----±--------------------±------+
    | Field | Type | Null | Key | Default | Extra |
    ±----------±-----------±-----±----±--------------------±------+
    | timestamp | timestamp | NO | PRI | current_timestamp() | |

    I’ve found a few reports recommending using DATETIME as Type, yet this is a containerized application and I’d prefer not to modify this.

  • If I run the same query noted above on the database I get timestamps which correspond to my timezone:

    mysql> SELECT timestamp, tempF FROM acuparse.temperature ORDER BY timestamp DESC ;
    ±--------------------±------+
    | timestamp | tempF |
    ±--------------------±------+
    | 2022-11-23 13:04:12 | 58.70 |
    | 2022-11-23 12:59:11 | 58.40 |
    | 2022-11-23 12:54:12 | 58.20 |

  • The browser timezones are different. Using JavaScript Browser Information - BrowserLeaks I see:
    Firefox: timeZone: UTC
    Brave/Chrome: timeZone: America/Los_Angeles

  • I’ve set (and unset) the Session timezone in the datasource to Etc/UTC yet this doesn’t resolve the issue.

  • I’ve also set (and reset) the timezone of the MariaDB Host. The container TZ is set to UTC.

  • I should also note I’ve tried setting the time zone to UTC in the panel settings. While this offers the correct time on the axis, the crosshairs show the incorrect time: https://imgur.com/a/U61u4yd

I’ve found only a few reports of similar issues yet they don’t seem to fully apply to this problem and/or I’m misunderstanding how it may be resolved.

It looks like you are pushing data into DB in local timezone, so:

| 2022-11-23 13:04:12 | 58.70 |

is

| 2022-11-23 13:04:12 (UTC -8) | 58.70 |

actually.

But timestamp should be in UTC.

I haven’t found the update in the application but I’m near certain the timestamp is in UTC. The mysql client query above adjusts to local timezone based on session values. Grafana is supposed to do this, but it’s not clear to me that it’s happening.