AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home/overview.html
GNU General Public License v3.0
25.63k stars 1.84k forks source link

[bug] log timestamp is still in UTC despite `log.local_time: true` #7359

Closed mangkoran closed 1 month ago

mangkoran commented 1 month ago

Prerequisites

Platform (OS and CPU architecture)

Linux, ARM64

Installation

Custom package (OpenWrt, HomeAssistant, etc; please mention in the description)

Setup

On a router, DHCP is handled by the router

AdGuard Home version

v0.107.53

Action

Set log.local_time to true in config file

Expected result

Log use local time format

Actual result

Log use UTC format

Additional information and/or screenshots

wezterm-gui_CbTRHUPoQ4

mangkoran commented 1 month ago

I think I have found the root cause/solution thanks to https://github.com/AdguardTeam/AdGuardHome/issues/6376#issuecomment-1790710521, https://github.com/daeuniverse/dae/discussions/345#discussion-5751926.

Because golang use local zoneinfo file to identify the timezone12 and relate package is not install by default at OpenWrt, so if you want the log time correct at OpenWrt, you should install the zoneinfo package

tl;dr solution is to install zoneinfo-all package.

opkg update
opkg install zoneinfo-all

Then restart adguardhome or reboot system.

image