[Solved] No timezone and bad time in luci

I build my own firmware from the v19.07.3...
I have an empty startyp luci and also a bad time information in system ;
2020-08-22_08-59

What did I forget from my build ?

# ls -h -l /usr/lib/lua/luci/sys/zoneinfo/tz*
-rw-r--r--    1 root     root       17.9K Aug 11 01:13 /usr/lib/lua/luci/sys/zoneinfo/tzdata.lua
-rw-r--r--    1 root     root        1.0K Aug 11 01:13 /usr/lib/lua/luci/sys/zoneinfo/tzoffset.lua
1 Like

The bad local time shown here probably means that you have too strict security settings in your browser and it can't fetch the time from your PC.

1 Like

No restriction at all...
And my others OpenWRT with official firmware are ok...

root@NAS:~# ls -h -l /usr/lib/lua/luci/sys/zoneinfo/tz*
-rw-rw-r--    1 root     root       17.9K Aug 18 16:22 /usr/lib/lua/luci/sys/zoneinfo/tzdata.lua
-rw-rw-r--    1 root     root        1.0K Aug 18 16:22 /usr/lib/lua/luci/sys/zoneinfo/tzoffset.lua

1 Like

I am guessing you have a DNS problem. The configuration for ntpd is a list of hostnames, if they cannot be resolved time will never be set.

We need to see your kernel log if it is not DNS

Also the timezone has to be set by you, the router doesn't know where it is

1 Like

The problem is the menu is empty...

2020-08-23_07-59

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.193 (gerald@P3530) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r11188-d8ecaef409)) #0 SMP Tue Aug 18 16:22:33 2020
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: Globalscale Marvell ESPRESSOBin Board V7 (eMMC)
[    0.000000] earlycon: ar3700_uart0 at MMIO 0x00000000d0012000 (options '')
[    0.000000] bootconsole [ar3700_uart0] enabled
[    0.000000] On node 0 totalpages: 262144
[    0.000000]   DMA zone: 4096 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 262144 pages, LIFO batch:31
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.0
[    0.000000] random: get_random_bytes called from start_kernel+0x80/0x45c with crng_init=0
[    0.000000] percpu: Embedded 16 pages/cpu s24856 r8192 d32488 u65536
[    0.000000] pcpu-alloc: s24856 r8192 d32488 u65536 alloc=16*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 258048
[    0.000000] Kernel command line: console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000 root=/dev/mmcblk0p2 rw ip=0.0.0.0:0.0.0.0:10.4.50.254:255.255.255.0:marvell:eth0:none nfsroot=0.0.0.0:/dev/mmcblk0p2
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.000000] Memory: 1021944K/1048576K available (5758K kernel code, 384K rwdata, 1624K rodata, 320K init, 267K bss, 26632K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff8008620000   (  5760 KB)
[    0.000000]     .rodata : 0xffffff8008620000 - 0xffffff80087c0000   (  1664 KB)
[    0.000000]       .init : 0xffffff80087c0000 - 0xffffff8008810000   (   320 KB)
[    0.000000]       .data : 0xffffff8008810000 - 0xffffff8008870008   (   385 KB)
[    0.000000]        .bss : 0xffffff8008870008 - 0xffffff80088b2ff0   (   268 KB)
[    0.000000]     fixed   : 0xffffffbefe7fb000 - 0xffffffbefec00000   (  4116 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01000000   (    16 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc040000000   (  1024 MB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	CONFIG_RCU_FANOUT set to non-default value of 32
[    0.000000] 	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: no VLPI support, no direct LPI support
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000d1d40000
[    0.000000] arch_timer: cp15 timer(s) running at 12.50MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049cda, max_idle_ns: 440795202628 ns
[    0.000004] sched_clock: 56 bits at 12MHz, resolution 80ns, wraps every 4398046511080ns
[    0.008349] Calibrating delay loop (skipped), value calculated using timer frequency.. 25.00 BogoMIPS (lpj=125000)
[    0.018940] pid_max: default: 32768 minimum: 301
[    0.023793] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.030625] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.038902] ASID allocator initialised with 32768 entries
[    0.044485] Hierarchical SRCU implementation.
[    0.049303] smp: Bringing up secondary CPUs ...
[    0.054221] Detected VIPT I-cache on CPU1
[    0.054251] GICv3: CPU1: found redistributor 1 region 0:0x00000000d1d60000
[    0.054283] CPU1: Booted secondary processor [410fd034]
[    0.054366] smp: Brought up 1 node, 2 CPUs
[    0.075073] SMP: Total of 2 processors activated.
[    0.079913] CPU features: detected: GIC system register CPU interface
[    0.086548] CPU features: detected: 32-bit EL0 Support
[    0.091834] CPU: All CPU(s) started at EL2
[    0.096051] alternatives: patching kernel code
[    0.102842] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.112933] futex hash table entries: 512 (order: 4, 65536 bytes)
[    0.119301] pinctrl core: initialized pinctrl subsystem
[    0.125237] NET: Registered protocol family 16
[    0.130550] cpuidle: using governor ladder
[    0.134843] vdso: 2 pages (1 code @ ffffff8008624000, 1 data @ ffffff8008814000)
[    0.142571] DMA: preallocated 256 KiB pool for atomic allocations
[    0.149714] d0012000.serial: ttyMV0 at MMIO 0xd0012000 (irq = 8, base_baud = 0) is a mvebu-uart
[    0.158614] console [ttyMV0] enabled
[    0.165986] bootconsole [ar3700_uart0] disabled
[    0.184888] SCSI subsystem initialized
[    0.188794] libata version 3.00 loaded.
[    0.189003] usbcore: registered new interface driver usbfs
[    0.194276] usbcore: registered new interface driver hub
[    0.200006] usbcore: registered new device driver usb
[    0.206398] clocksource: Switched to clocksource arch_sys_counter
[    0.213132] NET: Registered protocol family 2
[    0.217995] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    0.224995] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[    0.232104] TCP: Hash tables configured (established 8192 bind 8192)
[    0.238366] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.244722] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.251063] NET: Registered protocol family 1
[    0.255868] PCI: CLS 0 bytes, default 128
[    0.257136] Crashlog allocated RAM at address 0x3f00000
[    0.262541] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    0.273205] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.279197] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.291116] io scheduler noop registered
[    0.294821] io scheduler deadline registered (default)
[    0.302834] OF: PCI: host bridge /soc/pcie@d0070000 ranges:
[    0.308453] OF: PCI:   MEM 0xe8000000..0xe8ffffff -> 0xe8000000
[    0.314723] OF: PCI:    IO 0xe9000000..0xe900ffff -> 0xe9000000
[    1.316394] advk-pcie d0070000.pcie: link never came up
[    1.321688] advk-pcie d0070000.pcie: PCI host bridge to bus 0000:00
[    1.327848] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.333941] pci_bus 0000:00: root bus resource [mem 0xe8000000-0xe8ffffff]
[    1.341061] pci_bus 0000:00: root bus resource [io  0x0000-0xffff] (bus address [0xe9000000-0xe900ffff])
[    2.782339] advk-pcie d0070000.pcie: Posted PIO Response Status: CA, 0xe00 @ 0x0
[    2.790780] mv_xor d0060900.xor: Marvell shared XOR driver
[    2.856971] mv_xor d0060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    2.926974] mv_xor d0060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    2.934933] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    2.942044] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    2.950661] loop: module loaded
[    2.954365] ahci-mvebu d00e0000.sata: AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl platform mode
[    2.963497] ahci-mvebu d00e0000.sata: flags: ncq sntf led only pmp fbs pio slum part sxs 
[    2.972556] scsi host0: ahci-mvebu
[    2.976228] ata1: SATA max UDMA/133 mmio [mem 0xd00e0000-0xd00e1fff] port 0x100 irq 14
[    2.985640] m25p80 spi0.0: mx25u3235f (4096 Kbytes)
[    2.991462] libphy: Fixed MDIO Bus: probed
[    2.995958] libphy: orion_mdio_bus: probed
[    3.000497] mv88e6085 d0032004.mdio-mii:01: switch 0x3410 detected: Marvell 88E6341, revision 0
[    3.017347] libphy: /soc/internal-regs@d0000000/mdio@32004/switch0@1/mdio: probed
[    3.033721] mvneta d0030000.ethernet eth0: Using device tree mac address f0:ad:4e:08:ac:18
[    3.042239] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.048880] ehci-platform: EHCI generic platform driver
[    3.054263] ehci-orion: EHCI orion driver
[    3.058566] orion-ehci d005e000.usb: EHCI Host Controller
[    3.063900] orion-ehci d005e000.usb: new USB bus registered, assigned bus number 1
[    3.071827] orion-ehci d005e000.usb: irq 11, io mem 0xd005e000
[    3.106395] orion-ehci d005e000.usb: USB 2.0 started, EHCI 1.00
[    3.112836] hub 1-0:1.0: USB hub found
[    3.116397] hub 1-0:1.0: 1 port detected
[    3.121261] xhci-hcd d0058000.usb: xHCI Host Controller
[    3.126720] xhci-hcd d0058000.usb: new USB bus registered, assigned bus number 2
[    3.134402] xhci-hcd d0058000.usb: hcc params 0x0a000998 hci version 0x100 quirks 0x0000000000010010
[    3.143461] xhci-hcd d0058000.usb: irq 10, io mem 0xd0058000
[    3.149756] hub 2-0:1.0: USB hub found
[    3.153478] hub 2-0:1.0: 1 port detected
[    3.157899] xhci-hcd d0058000.usb: xHCI Host Controller
[    3.162955] xhci-hcd d0058000.usb: new USB bus registered, assigned bus number 3
[    3.170881] xhci-hcd d0058000.usb: Host supports USB 3.0  SuperSpeed
[    3.177214] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.186034] hub 3-0:1.0: USB hub found
[    3.189952] hub 3-0:1.0: 1 port detected
[    3.194391] usbcore: registered new interface driver usb-storage
[    3.200640] i2c /dev entries driver
[    3.204656] sdhci: Secure Digital Host Controller Interface driver
[    3.210991] sdhci: Copyright(c) Pierre Ossman
[    3.215282] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.221437] xenon-sdhci d00d0000.sdhci: Got CD GPIO
[    3.286399] mmc0: SDHCI controller on d00d8000.sdhci [d00d8000.sdhci] using ADMA
[    3.294946] NET: Registered protocol family 10
[    3.300362] Segment Routing with IPv6
[    3.304157] NET: Registered protocol family 17
[    3.309040] 8021q: 802.1Q VLAN Support v1.8
[    3.318971] mv88e6085 d0032004.mdio-mii:01: switch 0x3410 detected: Marvell 88E6341, revision 0
[    3.337492] libphy: /soc/internal-regs@d0000000/mdio@32004/switch0@1/mdio: probed
[    3.351912] DSA: switch 0 0 parsed
[    3.355439] DSA: tree 0 parsed
[    3.373799] xenon-sdhci d00d8000.sdhci: Timing issue might occur in DDR mode
[    3.381192] mmc0: new DDR MMC card at address 0001
[    3.386073] mmcblk0: mmc0:0001 SEM04G 3.69 GiB 
[    3.390841] mmcblk0boot0: mmc0:0001 SEM04G partition 1 2.00 MiB
[    3.397019] mmcblk0boot1: mmc0:0001 SEM04G partition 2 2.00 MiB
[    3.403130] mmcblk0rpmb: mmc0:0001 SEM04G partition 3 2.00 MiB, chardev (250:0)
[    3.411454]  mmcblk0: p1 p2 p3
[    4.098337] Marvell 88E6390 !soc!internal-regs@d0000000!mdio@32004!switch0@1!mdio:11: attached PHY driver [Marvell 88E6390] (mii_bus:phy_addr=!soc!internal-regs@d0000000!mdio@32004!switch0@1!mdio:11, irq=POLL)
[    4.218342] Marvell 88E6390 !soc!internal-regs@d0000000!mdio@32004!switch0@1!mdio:12: attached PHY driver [Marvell 88E6390] (mii_bus:phy_addr=!soc!internal-regs@d0000000!mdio@32004!switch0@1!mdio:12, irq=POLL)
[    4.338337] Marvell 88E6390 !soc!internal-regs@d0000000!mdio@32004!switch0@1!mdio:13: attached PHY driver [Marvell 88E6390] (mii_bus:phy_addr=!soc!internal-regs@d0000000!mdio@32004!switch0@1!mdio:13, irq=POLL)
[    4.358506] xenon-sdhci d00d0000.sdhci: Got CD GPIO
[    4.426536] genirq: Setting trigger mode 3 for irq 35 failed (armada_37xx_irq_set_type+0x0/0xf0)
[    4.435305] mmc1: SDHCI controller on d00d0000.sdhci [d00d0000.sdhci] using ADMA
[    4.443616] hctosys: unable to open rtc device (rtc0)
[    4.836514] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    4.996718] ata1.00: ATA-10: ST4000LM024-2AN17V, 0001, max UDMA/133
[    5.003344] ata1.00: 7814037168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    5.014182] ata1.00: configured for UDMA/133
[    5.019155] scsi 0:0:0:0: Direct-Access     ATA      ST4000LM024-2AN1 0001 PQ: 0 ANSI: 5
[    5.029232] sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[    5.037322] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    5.042699] sd 0:0:0:0: [sda] Write Protect is off
[    5.047430] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    5.047505] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    5.133905]  sda: sda1
[    5.140115] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    5.154648] EXT4-fs (mmcblk0p2): mounted filesystem without journal. Opts: (null)
[    5.162386] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    5.169102] Freeing unused kernel memory: 320K
[    5.242737] init: Console is alive
[    5.298095] random: fast init done
[    5.326754] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    5.339709] exFAT: Version 1.2.9
[    5.345139] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    5.358786] init: - preinit -
[    5.489811] random: jshn: uninitialized urandom read (4 bytes read)
[    5.519394] random: jshn: uninitialized urandom read (4 bytes read)
[    5.545450] random: jshn: uninitialized urandom read (4 bytes read)
[    8.739362] mount_root: mounting /dev/root
[    8.745736] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    8.753566] mount_root: loading kmods from internal overlay
[    8.770119] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[    8.778401] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[    9.134311] block: attempting to load /etc/config/fstab
[    9.187921] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: 
[    9.199665] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    9.212034] mount_root: switched to extroot
[    9.266362] urandom-seed: Seeding with /etc/urandom.seed
[    9.303586] procd: - early -
[    9.929047] procd: - ubus -
[    9.940137] urandom_read: 2 callbacks suppressed
[    9.940144] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.983103] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.990237] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.997620] procd: - init -
[   10.231501] urngd: v1.0.2 started.
[   10.276840] random: crng init done
[   10.280377] random: 2 urandom warning(s) missed due to ratelimiting
[   10.359070] kmodloader: loading kernel modules from /etc/modules.d/*
[   10.393075] Key type dns_resolver registered
[   10.408077] RPC: Registered named UNIX socket transport module.
[   10.413950] RPC: Registered udp transport module.
[   10.418839] RPC: Registered tcp transport module.
[   10.423853] RPC: Registered tcp NFSv4.1 backchannel transport module.
[   10.439076] ntfs: driver 2.1.32 [Flags: R/O MODULE].
[   10.493944] NFS: Registering the id_resolver key type
[   10.499077] Key type id_resolver registered
[   10.503513] Key type id_legacy registered
[   10.521386] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   10.548734] ip_tables: (C) 2000-2006 Netfilter Core Team
[   10.561902] nf_conntrack version 0.5.0 (8192 buckets, 32768 max)
[   10.615004] xt_time: kernel timezone is -0000
[   10.625913] PPP generic driver version 2.4.2
[   10.631737] NET: Registered protocol family 24
[   10.639387] kmodloader: done loading kernel modules from /etc/modules.d/*
[   12.908070] mvneta d0030000.ethernet eth0: configuring for fixed/rgmii-id link mode
[   12.916962] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   12.923044] mvneta d0030000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   12.930539] br-lan: port 1(lan0) entered blocking state
[   12.936420] br-lan: port 1(lan0) entered disabled state
[   12.945707] device lan0 entered promiscuous mode
[   12.950508] device eth0 entered promiscuous mode
[   12.990438] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   13.003065] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   13.017034] br-lan: port 2(lan1) entered blocking state
[   13.022504] br-lan: port 2(lan1) entered disabled state
[   13.041400] device lan1 entered promiscuous mode
[   13.091514] br-lan: port 3(wan) entered blocking state
[   13.096712] br-lan: port 3(wan) entered disabled state
[   13.109655] device wan entered promiscuous mode
[   13.753318] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: 
[   14.211479] mv88e6085 d0032004.mdio-mii:01 lan0: Link is Down
[   14.297018] mv88e6085 d0032004.mdio-mii:01 wan: Link is Down
[   14.303957] mv88e6085 d0032004.mdio-mii:01 lan1: Link is Down
[   15.342021] mv88e6085 d0032004.mdio-mii:01 wan: Link is Up - 100Mbps/Full - flow control rx/tx
[   15.351458] br-lan: port 3(wan) entered blocking state
[   15.356878] br-lan: port 3(wan) entered forwarding state
[   15.364763] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   99.144257] br-lan: port 4(vethEWHXIK) entered blocking state
[   99.150235] br-lan: port 4(vethEWHXIK) entered disabled state
[   99.156561] device vethEWHXIK entered promiscuous mode
[   99.163601] IPv6: ADDRCONF(NETDEV_UP): vethEWHXIK: link is not ready
[   99.470828] cgroup: lxc-start (1620) created nested cgroup for controller "memory" which has incomplete hierarchy support. Nested cgroups may change behavior in the future.
[   99.486807] cgroup: "memory" requires setting use_hierarchy to 1 on the root
[   99.582253] eth0: renamed from vethG0Q907
[   99.649063] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   99.655288] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   99.662501] IPv6: ADDRCONF(NETDEV_CHANGE): vethEWHXIK: link becomes ready
[   99.670097] br-lan: port 4(vethEWHXIK) entered blocking state
[   99.676184] br-lan: port 4(vethEWHXIK) entered forwarding state
[  100.367965] new mount options do not match the existing superblock, will be ignored

Not at all, this is a dhcp client and it get the dns from my routeur...
THe ping of openwrt.org is okay

Looks like you do not have the "Time synchorization" tab at all in LuCI.

From normal master:

What have you removed?
The necessary components belong to the default OpenWrt and LuCI and are on by default, so the question is that you may have intentionally removed something, a bit too much.

My guess is that you have removed or disabled the ntpd service, so LuCI doesn't show items related to it.

root@router1:~# ps | grep ntpd
 3031 root      1108 S<   /usr/sbin/ntpd -n -N -S /usr/sbin/ntpd-hotplug -p 0.openwrt.pool.ntp.org ...

Ps.
All settings are in /etc/config/system, and LuCI has no major role here in the actual timezone utilisation.
Verbal "zonename" option like "Europe/Helsinki" is just a clear-text clarification for the user, and all real system functionality goes via the "timezone" string that LuCI adjusts in the background, if you change timezone with LuCI .

option timezone 'EET-2EEST,M3.5.0/3,M10.5.0/4'
option zonename 'Europe/Helsinki'

That TZ string gets put into /etc/TZ and /tmp/TZ file at startup, and that is where musl & co. pick it up.

root@router1:~# cat /tmp/TZ
EET-2EEST,M3.5.0/3,M10.5.0/4

(The situation may change a bit if you install the full zoneinfo packages, but that is rare.)

3 Likes

Thanks,

I have install ntpd and luci-app-ntp which were missing, but it changed nothing !
I will make a new build and test it...

Yeah it looks like you have packages missing or damaged

What is the output of
ubus call system info
and
date

the localtime there should be at least the build time instead of time 0

remember it is unix / NTP time in seconds

if it is correct then the problem is only LuCI
if it is close but not correct the problem is ntp client

1 Like

Didi you enable the service and did you verify that it runs?
And did you reboot the router?

1 Like

My bad I should have said system log, but it seems like ntp is not logged anywhere...

root@OpenWrt:~# ubus call system info
{
	"localtime": 1597769986,
	"uptime": 2242,
	"load": [
		8128,
		3520,
		1056
	],
	"memory": {
		"total": 1047240704,
		"free": 993972224,
		"shared": 1101824,
		"buffered": 2514944,
		"available": 980819968,
		"cached": 18853888
	},
	"swap": {
		"total": 0,
		"free": 0
	}
}
root@OpenWrt:~# date
Tue Aug 18 16:59:53 UTC 2020
root@OpenWrt:~# ubus call system info
{
	"localtime": 1597769986,
	"uptime": 2242,
	"load": [
		8128,
		3520,
		1056
	],
	"memory": {
		"total": 1047240704,
		"free": 993972224,
		"shared": 1101824,
		"buffered": 2514944,
		"available": 980819968,
		"cached": 18853888
	},
	"swap": {
		"total": 0,
		"free": 0
	}
}
root@OpenWrt:~# date
Tue Aug 18 16:59:53 UTC 2020
root@OpenWrt:~# opkg install luci-app-ntpc
Installing luci-app-ntpc (git-20.234.16293-a82f67e-1) to root...
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/aarch64_cortex-a53/luci/luci-app-ntpc_git-20.234.16293-a82f67e-1_all.ipk
Installing ntpclient (2015_365-2) to root...
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/aarch64_cortex-a53/packages/ntpclient_2015_365-2_aarch64_cortex-a53.ipk
Configuring ntpclient.
Configuring luci-app-ntpc.
root@OpenWrt:~# opkg install ntpd
Installing ntpd (4.2.8p15-1) to root...
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/aarch64_cortex-a53/packages/ntpd_4.2.8p15-1_aarch64_cortex-a53.ipk
Installing libevent2-core7 (2.1.11-1) to root...
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/aarch64_cortex-a53/base/libevent2-core7_2.1.11-1_aarch64_cortex-a53.ipk
Installing libevent2-pthreads7 (2.1.11-1) to root...
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/aarch64_cortex-a53/base/libevent2-pthreads7_2.1.11-1_aarch64_cortex-a53.ipk
Installing ntp-utils (4.2.8p15-1) to root...
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/aarch64_cortex-a53/packages/ntp-utils_4.2.8p15-1_aarch64_cortex-a53.ipk
Configuring libevent2-core7.
Configuring libevent2-pthreads7.
Configuring ntp-utils.
Collected errors:
 * check_data_file_clashes: Package ntpd wants to install file /sbin/ntpd
	But that file is already provided by package  * busybox
 * opkg_install_cmd: Cannot install package ntpd.
root@OpenWrt:~# opkg install ntpd --force-overwrite
Installing ntpd (4.2.8p15-1) to root...
Downloading http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/aarch64_cortex-a53/packages/ntpd_4.2.8p15-1_aarch64_cortex-a53.ipk
Configuring ntpd.
root@OpenWrt:~# /etc/init.d/ntpd enable
root@OpenWrt:~# /etc/init.d/ntpd restart
root@OpenWrt:~#

after a reboot :

root@OpenWrt:~# ps | grep ntp
 1950 root       824 S    /usr/sbin/ntpclient -i 600 -s -l -D -p 123 -h 1.openwrt.pool.ntp.org
 2031 root      1204 S    /bin/sh /usr/sbin/ntpd.hotplug-helper
 2049 root      1212 S    grep ntp

root@OpenWrt:~# date
Sun Aug 23 08:36:20 UTC 2020

but luci system/time still broken (absent)

uci show system; pgrep -f -a ntpd
root@OpenWrt:~# uci show system; pgrep -f -a ntpd
system.@system[0]=system
system.@system[0].hostname='OpenWrt'
system.@system[0].timezone='UTC'
system.@system[0].ttylogin='0'
system.@system[0].log_size='64'
system.@system[0].urandom_seed='0'
system.ntp=timeserver
system.ntp.enabled='1'
system.ntp.enable_server='0'
system.ntp.server='0.openwrt.pool.ntp.org' '1.openwrt.pool.ntp.org' '2.openwrt.pool.ntp.org' '3.openwrt.pool.ntp.org'
2031 /bin/sh /usr/sbin/ntpd.hotplug-helper

/etc/init.d/ntpd disable
/etc/init.d/ntpd stop
/etc/init.d/sysntpd enable
/etc/init.d/sysntpd restart
pgrep -f -a ntpd; date