roblatour / ESP32TimeServer

ESP32 NTP Stratum1 Time Server
MIT License
31 stars 6 forks source link

Add the current time zone to the clock display #3

Closed BigThunderSR closed 1 year ago

BigThunderSR commented 1 year ago

This change adds the abbreviated text of the current time zone (e.g. EST, EDT etc.) to the clock display.

roblatour commented 1 year ago

I'm unclear as to the value of this, would you not already know what time zone you are in?

BigThunderSR commented 1 year ago

Many digital clocks that transition between DST and standard time automatically have a display of the time zone to indicate what time zone the clock is displaying. It is also helpful to confirm the state when the time does transition between DST and standard time. Another benefit is if you make a mistake in the calculation of the values to input for your time zone in the settings file. With the display showing which time zone the error is in when compared to your real time, you know which line needs correcting.

roblatour commented 1 year ago

Ok - however, personally, I think I would rather not see it on the display.

Would you consider updating the commit to include a new global variable in the .ino and .cpp files such as:

const bool displayTimeZone = false; // set to true to display the time zone, set to false to not display the time zone

and then in the code test that and only add the time zone to the display if it is set to true.

If yes, I would be happy to include on that basis.

BigThunderSR commented 1 year ago

Yes, that's a fair request. I will update the PR when I have a chance to put this together. Thanks.

BigThunderSR commented 1 year ago

@roblatour, I have made the changes you requested. Hope this is acceptable. Thanks.

roblatour commented 1 year ago

in both programs, could you please change the line that reads:

if (displayTimeZone == true)

to

if (displayTimeZone)

just to stay consistent with the rest of the program.

Once done, I'll accept the commit.

Thanks for this. hope the program is of good use to you.

Best Regards,

Rob

roblatour commented 1 year ago

Thanks again @BigThunderSR ; your updates have been merged.