diff --git a/README.md b/README.md index 944be3b5..2a277ab9 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Follow the **[Grafana Setup](https://github.com/jasonacox/Powerwall-Dashboard#gr If you prefer, you can perform the same steps that `setup.sh` performs. -You will want to set your local timezone by editing `pypowerwall.env`, `influxdb.sql` and `dashboard.json` or you can use this handy `tz.sh` update script. A list of timezones is available [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). +You will want to set your local timezone by editing `pypowerwall.env`, `telegraf.conf`, `influxdb.sql` and `dashboard.json` or you can use this handy `tz.sh` update script. A list of timezones is available [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). ```bash # Replace with your timezone diff --git a/telegraf.conf b/telegraf.conf index f2c0c0bd..6a2df038 100644 --- a/telegraf.conf +++ b/telegraf.conf @@ -115,10 +115,12 @@ [[processors.date]] tag_key = "month" date_format = "Jan" + timezone = "America/Los_Angeles" [[processors.date]] tag_key = "year" date_format = "2006" + timezone = "America/Los_Angeles" # Configuration for sending metrics to InfluxDB #[[outputs.influxdb]] diff --git a/tz.sh b/tz.sh index 17ad7fad..0c60a423 100755 --- a/tz.sh +++ b/tz.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Shell script to replace timezone values in powerwall.yml, influxdb.sql and dashboard.json +# Shell script to replace timezone values in powerwall.yml, telegraf.conf, influxdb.sql and dashboard.json if [ $# -eq 0 ] then echo "ERROR: No timzezone supplied" @@ -18,6 +18,7 @@ updatetz() { local from=${1} local to=${2} sed -i.bak "s@${from}@${to}@g" powerwall.yml + sed -i.bak "s@${from}@${to}@g" telegraf.conf sed -i.bak "s@${from}@${to}@g" influxdb/influxdb.sql for i in dashboard*.json; do sed -i.bak "s@${from}@${to}@g" $i