AdguardTeam / AdGuardHome

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

Incorrect time in the log #6376

Closed fizsef closed 3 months ago

fizsef commented 8 months ago

Prerequisites

Platform (OS and CPU architecture)

Linux, ARM64

Installation

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

Setup

On one machine

AdGuard Home version

107.40

Action

I'm looking at the AdGuardHome.log log file

Expected result

I expect to see the correct time selected in the system

Actual result

The time in the log file is incorrect, less than three hours.

Additional information and/or screenshots

OpenWRT 23.05, Xiaomi AX6s router. The Europe-Moscow time zone is selected in the system, the zoneinfo-all package is installed.

schzhn commented 8 months ago

Hello, @fizsef. Maybe this will help you https://stackoverflow.com/questions/54035376/why-running-golangs-time-now-at-openwrt-always-get-utc-time

ainar-g commented 8 months ago

@fizsef

Europe-Moscow time zone is selected in the system

Please make sure that this is the case for the user which launches the AdGuardHome process as well.

fizsef commented 8 months ago

@fizsef

Europe-Moscow time zone is selected in the system

Please make sure that this is the case for the user which launches the AdGuardHome process as well.

Sorry, but how to do it, how to check?

ainar-g commented 8 months ago

I do not know the peculiarities of the OpenWrt port, but generally you need to find out the system user of the process running AdGuardHome and see if it is set for them. If you can modify the service environment, you can add something like TZ=Europe/Moscow to it.

Sakura-Luna commented 7 months ago

There seems to be a bug in the log. When you enable local_time and update the list, the new record changes back to UTC time.

fizsef commented 7 months ago

Changing the lokal_time option does not affect anything for me. What is enabled, what is disabled, the UTC time is still in the log, minus 3 hours from the time set in OpenWRT. It is not clear at all what this option affects.

ainar-g commented 7 months ago

@Sakura-Luna, please make sure that you're stopping AGH before making any changes to the configuration file. Otherwise the changes are overwritten.

@fizsef, have you configured the environment as proposed above?