Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change logging time-stamp #125

Closed
cbuijs opened this issue Jan 12, 2021 · 4 comments
Closed

Change logging time-stamp #125

cbuijs opened this issue Jan 12, 2021 · 4 comments

Comments

@cbuijs
Copy link
Contributor

cbuijs commented Jan 12, 2021

Looks like the logging produced by RouteDNS defaults to "Zulu" (UTC) time by default. It would be great if the time-zone is configurable for logging.

time="2021-01-12T08:34:45Z" level=debug msg="reloading blocklist" id=home-hosts

@folbricht
Copy link
Owner

Can you check what the machine's timezone is set to? I just double-check one mine, it's using whatever the machine uses for me. It should already be respecting the OS' timezone.

@cbuijs
Copy link
Contributor Author

cbuijs commented Jan 16, 2021

root@OpenWrt:~# date +%Z
CET

So it is CET where the logging says "Z".

@folbricht
Copy link
Owner

What version of Go are you using? I wonder if you're running into golang/go#42138. Might be worth grabbing the latest just in case

@cbuijs
Copy link
Contributor Author

cbuijs commented Jan 16, 2021

Version 1.15.6 of GO.

I found the culprit, it is an openwrt system which standard has no zoneinfo or/and /etc/localtime. Creating it fixed the problem

Fix (for openwrt in this case):

opkg update && opkg install zoneinfo-europe
ln -s /usr/share/zoneinfo/CET /etc/localtime

@cbuijs cbuijs closed this as completed Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants