Fix and update timezone default and doc#1837
Fix and update timezone default and doc#1837michaelortmann wants to merge 5 commits intoeggheads:developfrom
Conversation
|
@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. Lines 366 to 367 in d317ac2 I was thinking about switching the timezone and env settings in eggdrop.conf: we could: 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. And when we later remove variable timezone, we patch ques5.tcl to use env(TZ) directly. |
|
Playing with the pre-PR version, I just noticed this interesting timestamp gem: |
|
@vanosg this bug also exists in branch develop, its not a PR bug. anyway. took me a while to find and fix this bug. but here we are :) ready for review again! |
|
I understand the terminology basis for changing the value of the timezone config setting, but how will this affect old non-updated configs being used after this change is made? |
|
if an old config is used, it will work as before |
Co-authored-by: Thomas Sader <thommey@gmail.com>
I have always hated how Eggdrop handles timezones- offset was added for scripting only. Taking it out could cause issues? Maybe we just hardcode it to 0 in the codebase so nothing crashes, and implement this one as part of 1.11.0? |
|
if tcl scripts use "offset" they would change behaviour, but they should not crash because offset was always just a tcl variable set in eggdrop.conf so scripts could never depend on its existence. to not break behaviour of tcls, we could (maybe should?) calculate and set the tcl variable offset based on the set timezone. this would be nice, wouldnt it? |
|
also, static offsets (like we currently have in eggdrop.conf) are not a worse alternative to timezone names, they are not equivalent/static. many timezones have different offsets throughout the year. no one should be damned to update offset manually to stay synced to their timezone. due to changing offsets, we can argue that the idea of using offset in tcls was borked and never really worked all time anyway. therefore removing offset alltogether is justified. what do you say? calculate and set offset whenever timezone is set/changed or remove it? |
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:
Local time is now 02:53Test 2
myeggdrop.conf:
Local time is now 20:55