openwrt / luci

LuCI - OpenWrt Configuration Interface
Apache License 2.0
6.33k stars 2.52k forks source link

local time is incorrect #6787

Closed hiepvq closed 9 months ago

hiepvq commented 9 months ago

i set timezone to Asia/Ho Chi Minh but it always incorrect 1 hour compared to current time of my pc image

Additional Information:

OpenWrt version information

Powered by LuCI Master (git-23.346.45702-3e8eb4a) / ArgonTheme v1.8.3 / OpenWrt Li [2023] v7.5 Compiled

systemcrash commented 9 months ago

Does the timezones file or package need updating, I wonder.

What does your /etc/TZ contain?

hiepvq commented 9 months ago

switch to other timezone then switch to my timezone, it display is ok but if reboot router, it will get back is incorrect. that time is chinese

root@OpenWrt:~# cat /etc/TZ
cat: can't open '/etc/TZ': No such file or directory
hiepvq commented 9 months ago

vi /etc/config/system

config system
    option hostname 'OpenWrt'
    option ttylogin '0'
    option log_size '64'
    option urandom_seed '0'
    option log_proto 'udp'
    option conloglevel '8'
    option cronloglevel '8'
    option timezone '<+07>-7'
    option zonename 'Asia/Ho Chi Minh'

config timeserver 'ntp'
    option enabled '1'
    list server '0.openwrt.pool.ntp.org'
    list server '1.openwrt.pool.ntp.org'
    list server '2.openwrt.pool.ntp.org'
    list server 'cn.pool.ntp.org'
    list server '3.openwrt.pool.ntp.org'
    option enable_server '1'
systemcrash commented 9 months ago

Not that file....

hiepvq commented 9 months ago

I think config is still work. it only display incorrect local time in System -> system it still display correct here. my time UTC+7 image

hiepvq commented 9 months ago

Not that file....

it is empty, there is no this file

brada4 commented 9 months ago

/etc/TZ should be a symlink to /tmp/TZ, which contains something along lines of +7 date vs date -u to confirm it. You are using a fork "compiled by li" , probably you should choose between asking li and using real OpenWRT, absent TZ file kind of says Li removed it.

hiepvq commented 9 months ago

/etc/TZ should be a symlink to /tmp/TZ, which contains something along lines of +7 date vs date -u to confirm it. You are using a fork "compiled by li" , probably you should choose between asking li and using real OpenWRT, absent TZ file kind of says Li removed it.

Ok Thank, so i will close this issue