Why does Grafana send Alert timestamps in local time, when the system is configured as UTC?

We have an alert that keeps track of new_state_date and I’ve added a sister field, prev_state_date. When these are updated, they’re updated with the appropriate UTC timestamp:

41%20PM

However, when I query these fields from the API, I get:
{[....], "NewStateDate":"2018-04-20T16:05:41-04:00","PrevStateDate":"2018-04-20T15:45:11-04:00", [....]}

Why is this sending timestamps in my local (EDT) timestamp, when it’s explicitly stored as UTC (16:00 EDT is in the future from this post)


Further testing, I tried hitting our hosted app (connected to the same database) instead of my local dev server, and it actually returns in the correct format: "NewStateDate":"2018-04-20T16:05:41Z","PrevStateDate":"2018-04-20T15:45:11Z"

So I’m not sure if this is a Grafana issue, but any help would be appreciated – would make local debugging a lot easier :slight_smile:

what timezone is the server (and grafana-server process) running onder (check TZ env variable )

I don’t see a TZ env variable (or config setting) anywhere – I checked the docs, and likewise didn’t see anything related. I’m not passing in anything to the server process, just using a custom.ini and running with ./bin/grafana-server – no timezone settings are present in the included .ini files though.

most linux distros have a variable for this, otherwise it just use system time