pi-hole / FTL

The Pi-hole FTL engine
https://pi-hole.net
Other
1.34k stars 187 forks source link

Print human-readable timezone information #1981

Closed DL6ER closed 4 weeks ago

DL6ER commented 1 month ago

What does this implement/fix?

Add timezone information in human-readable timestamps.

This change has been triggered by a user seeking help after they had found a mismatch of timestamps between their two Pi-holes. We have been able to track it down to one server using a local timezone and the other one having been set to UTC.

Old

2024-05-30 19:45:08.488 [3519896M] DEBUG_QUERIES: time.nist.gov is known as not to be blocked

New

2024-05-30 19:45:08.488 CEST [3519896M] DEBUG_QUERIES: time.nist.gov is known as not to be blocked

Related issue or feature (if applicable): (private communication)

Pull request in docs with documentation (if applicable): N/A


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

Checklist:

github-actions[bot] commented 1 month ago

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] commented 1 month ago

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] commented 1 month ago

Conflicts have been resolved.

yubiuser commented 1 month ago

I think this is a useful feature which should be used everywhere. v6 will break a lot of existing stuff, I think it's OK to change the log format. (I think to remember we already change the format from v5 to V6 by including message severity...)

DL6ER commented 4 weeks ago

@yubiuser The timezone is now always there