TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.27k stars 418 forks source link

Logging - "Use Local Time" has no effect #630

Closed michael-pellegrini closed 1 year ago

michael-pellegrini commented 1 year ago

Hi Shreyas, The "Use Local Time" check box does not affect the actual time in the latest docker image. LocalTime

ShreyasZare commented 1 year ago

Thanks for the post. This seems to be the same issue we discussed earlier in #374. The solution is to configure timezone for the docker container as discussed here.

michael-pellegrini commented 1 year ago

Selecting the check box to "use local time" worked on version 10.0.1

On the Latest version 11.1.1 I have to set ENV and symlink Timezone to local time on dockerfile like on version 8 ENV TZ=America/New_York ln -sf /usr/share/zoneinfo/$TZ /etc/localtime

ShreyasZare commented 1 year ago

Selecting the check box to "use local time" worked on version 10.0.1

On the Latest version 11.1.1 I have to set ENV and symlink Timezone to local time on dockerfile like on version 8 ENV TZ=America/New_York ln -sf /usr/share/zoneinfo/$TZ /etc/localtime

From code perspective nothing has changed between these two versions regarding the "use local time" option. The code just uses the local time that the .NET runtime returns which in turn depends on what timezone is set at the OS level. So, in case of docker, its what timezone the docker container is using. There is nothing that can be done in code to change this behavior.

michael-pellegrini commented 1 year ago

Thank you for the update. Can mark this one closed.

Sent from Proton Mail for iOS

On Tue, May 23, 2023 at 3:13 AM, Shreyas Zare @.***(mailto:On Tue, May 23, 2023 at 3:13 AM, Shreyas Zare < wrote:

Selecting the check box to "use local time" worked on version 10.0.1

On the Latest version 11.1.1 I have to set ENV and symlink Timezone to local time on dockerfile like on version 8 ENV TZ=America/New_York ln -sf /usr/share/zoneinfo/$TZ /etc/localtime

From code perspective nothing has changed between these two versions regarding the "use local time" option. The code just uses the local time that the .NET runtime returns which in turn depends on what timezone is set at the OS level. So, in case of docker, its what timezone the docker container is using. There is nothing that can be done in code to change this behavior.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>