Setting Time zones

Hi,

Is it possible to set the timezone in the configs for either Telegraf or Influxdb? I’ve realised that my influx server is recording the correct time but the timestamps in the database are an hour behind. Is it possible to update either Telegraf or Influxdb to record these timestamps as Europe/London?

Thanks,

Phil

There isn’t a way to do this, but since the timestamps are saved in UTC if the time is wrong then you should investigate if the system clock is setup properly.

Hi Daniel, thanks for the reply.

I didn’t think so after reading the docs - I’m not sure why i thought it was possible but oh well.

The server time is set to Europe/London so the time on there is correct and the logs for telegraf show the correct times it’s just the time stamps in the database itself. I’ll have to look into it before deploying.

Regards,

PhilB

@philb Like Daniel said, InfluxDB stores all values in UTC; the conversion is done for you automatically based on the time zone of your client. London is currently on GMT+1 because of Daylight Savings Times, so it sounds like everything is working properly.

When viewing your data in Chronograf, the times are automatically converted from UTC to your local time.

Hi @noahcrowley

Sorry i didn’t realise you had replied. The servers are set to Europe/London, I’m viewing the data before grafana or chronograf but the time is displayed correctly in those.
The unix time stamps are an hour out of sync. so the server knows it is 14:32 at the moment, but the data points are an hour behind so 13:32.

It isn’t a major issue for me. I’d just noticed the times in the alert we’re an hour off. it still alerts when it should I just wondered if there was a setting to adjust the times for daylight saving.