Skip to content

Conversation

@michaelortmann
Copy link
Member

@michaelortmann michaelortmann commented Oct 2, 2025

Found by: https://github.com/thommey and https://github.com/dchmelik
Patch by: https://github.com/michaelortmann
Fixes: #461 and #1831

One-line summary:
Fix and update timezone default and doc

Additional description (if needed):

Test cases demonstrating functionality (if applicable):
Test 1
myeggdrop.conf:

#set timezone "America/New_York"
#set env(TZ) "$timezone"

Local time is now 02:53
Test 2
myeggdrop.conf:

set timezone "America/New_York"
set env(TZ) "$timezone"

Local time is now 20:55

@michaelortmann
Copy link
Member Author

@thommey: This fix is similar to what you ask in issue #461, but not quite the very same. I aim to fix both Issues with this PR. $timezone is used in scripts. In the ones we ship by default:

eggdrop/scripts/ques5.tcl

Lines 366 to 367 in d317ac2

if {![info exists timezone]} {
set timezone [clock format 0 -format %Z]

I was thinking about switching the timezone and env settings in eggdrop.conf:
instead of:

#set timezone "Europe/Berlin"
#set env(TZ) "$timezone"

we could:

#set env(TZ) "Europe/Berlin"
# Set variable timezone for tcl scripts. This variable is deprecated and will be removed in a future release.
#set timezone $env(TZ)

But then i realized, if users only want to set the timezone variable and not the env(TZ) this make sthings more complicated for them.
So my new proposal is:

# Variable timezone for tcl scripts is deprecated and will be removed in a future release. So in a future release set env(TZ) "Europe/Berlin" directly instead.
#set timezone "Europe/Berlin"
#set env(TZ) "$timezone"

And when we later remove variable timezone, we patch ques5.tcl to use env(TZ) directly.
I hope someone comes up with a better doc wording here.

@vanosg vanosg added this to the v1.10.2 milestone Dec 20, 2025
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

Successfully merging this pull request may close these issues.

Make timezone setting easier

2 participants