zabbix / zabbix-docker

Official Zabbix Dockerfiles
https://www.zabbix.com
GNU Affero General Public License v3.0
2.34k stars 1.36k forks source link

[feature request] Please add TZ environment support to zabbix proxy image #1301

Closed pirateunclejack closed 6 months ago

pirateunclejack commented 6 months ago
SUMMARY

zabbix-proxy-sqlite3 does not support to change timezone via TZ environment I notice that the tzdata package is not installed on zabbix-proxy image.

OS / ENVIRONMENT / Used docker-compose files

Image : zabbix/zabbix-proxy-sqlite3:6.4.12-ubuntu Docker version : Docker version 20.10.7, build 20.10.7-0ubuntu5~20.04.2 System: Ubuntu 20.04 LTS (GNU/Linux 5.4.0-124-generic x86_64) Environment: KuberSphere v3.2.1 Kubernetes: v1.22.0 Helm : version.BuildInfo{Version:"v3.14.3", GitCommit:"f03cc04caaa8f6d7c3e67cf918929150cf6f3f12", GitTreeState:"clean", GoVersion:"go1.21.7"} Helm chat : https://github.com/zabbix-community/helm-zabbix 4.2.0

CONFIGURATION

TZ="Asia/Shanghai"

STEPS TO REPRODUCE
# values.yml
...
zabbixProxy
  extraEnv:
    - name: TZ
      value: "Asia/Shanghai"
...
EXPECTED RESULTS

The timezone should chang if TZ environment variable exists.

ACTUAL RESULTS

The timezone is still UTC.

dotneft commented 6 months ago

why do you need any timezone there? Zabbix operates with unix timestamps.

pirateunclejack commented 6 months ago

I think it will be convenient to debug if server and proxy have the same timezone in log.

dotneft commented 6 months ago

Agree! Will check it.

dotneft commented 6 months ago

Added, thank you!