Closed dbox233 closed 6 months ago
感谢反馈!
这是 OpenWrt 的问题, 请参见 https://stackoverflow.com/questions/54035376/why-running-golangs-time-now-at-openwrt-always-get-utc-time 和 https://www.ohyee.cc/post/note_go_read_openwrt_timezone.
快速解决方法:
root@OpenWrt:/tmp/upload# opkg update
root@OpenWrt:/tmp/upload# opkg install zoneinfo-asia
root@OpenWrt:/tmp/upload# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
root@OpenWrt:/tmp/upload# ./qBittorrent-ClientBlocker
[2024-03-10 13:59:59][ShowVersion] qBittorrent-ClientBlocker 2.9 (linux, mipsle).
原来如此,感谢!
如上,系统时区是UTC+8,但日志却使用UTC+0