How to change influxdb system/internal logs to any timezone?

we are running influxdb as a pod(stable helm charts) in k8s, we’re trying to change the timezone of logstash internal/system logs.
by default logs are coming in utc timezone

logs starts with ts, ans ts(timestamp is coming in utc timezone, how to change to other timezone??)

ex

ts=2020-08-12T08:27:54.866071Z lvl=info msg="InfluxDB starting" log_id=0O_SNESW000 version=1.7.3 branch=1.7 commit=698dbc789aff13c2678357a6b93ff73dd7136571
ts=2020-08-12T08:27:54.866159Z lvl=info msg="Go runtime" log_id=0O_SNESW000 version=go1.11 maxprocs=8
ts=2020-08-12T08:27:54.968206Z lvl=info msg="Using data dir" log_id=0O_SNESW000 service=store path=/var/lib/influxdb/data
ts=2020-08-12T08:27:54.968469Z lvl=info msg="Compaction settings" log_id=0O_SNESW000 service=store max_concurrent_compactions=4 throughput_bytes_per_second=50331648 throughput_bytes_per_second_burst=50331648
ts=2020-08-12T08:27:54.968491Z lvl=info msg="Open store (start)" log_id=0O_SNESW000 service=store trace_id=0O_SNEr0000 op_name=tsdb_open op_event=start
ts=2020-08-12T08:27:54.974352Z lvl=info msg="Opened file" log_id=0O_SNESW000 engine=tsm1 service=filestore path=/var/lib/influxdb/data/SDPONActiveAlarms/sdponalarm/3/000000001-000000001.tsm id=0 duration=0.295ms

Hi @aksshm, it’s not currently possible to change the TZ in influxd’s logs (we hard-code UTC when configuring the logger). It’s unlikely that we would ever expose a configuration option to support use of a different TZ. As a work-around, we’d recommend passing the logs through a separate processing system to parse / rewrite the timestamps.

1 Like