77
1391
2万
元老级技术达人
System Health version: core-2021.7.3 installation_type: Home Assistant OS dev: false hassio: true docker: true virtualenv: false python_version: 3.9.5 os_name: Linux os_version: 5.10.45 arch: x86_64 timezone: Asia/Shanghai GitHub API: ok Github API Calls Remaining: 4825 Installed Version: 1.13.2 Stage: running Available Repositories: 856 Installed Repositories: 26 logged_in: false can_reach_cert_server: ok can_reach_cloud_auth: failed to load: unreachable can_reach_cloud: ok host_os: Home Assistant OS 6.1 update_channel: stable supervisor_version: supervisor-2021.06.8 docker_version: 20.10.6 disk_total: 11.1 GB disk_used: 6.1 GB healthy: true supported: true board: ova supervisor_api: ok version_api: failed to load: unreachable installed_addons: Mosquitto broker (6.0.1), Samba share (9.5.1), RPC Shutdown (2.2), Nginx Proxy Manager (0.11.0), InfluxDB (4.1.1), MariaDB (2.4.0), Node-RED (9.2.1), Traccar (0.13.0), ESPHome (1.20.0) dashboards: 3 resources: 23 views: 17 mode: storage
程序启动时加两行代码即可: import os,time os.environ['TZ'] = 'Asia/Shanghai' time.tzset() #Python time tzset() 根据环境变量TZ重新初始化时间相关设置。
使用道具 举报
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|Hassbian
GMT+8, 2024-11-27 08:44 , Processed in 0.345437 second(s), 25 queries .
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.