-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting timezone with setenv doesn't work properly any more with V 2.7.1 #7353
Comments
Check #6993 and #7109.
You can use otherwise
|
Great! Best regards and thank you for your support! |
Thanks for the feedback @ElToberino For backward compatibility, I think we should check in @devyte @earlephilhower I'll make a PR for 2.7.2 |
I think that's a good idea. Searching the web I found not so much information, though this way of getting local time is really simple and user friendly. I guess a lot of people even don't know that this great function is already implemented in the ESP8266 Arduino Core. |
Writing documentation is not our best skills... (at least speaking of me) |
@ElToberino #7357 will not be merged. |
OK, thanks for the information. I found this simple solution on a German ESP-Site: https://fipsok.de/Esp8266-Webserver/ntp-zeit-esp8266.tab This seemed to be a very easy way of getting and configuring local time and so I took the idea for my time function. Thank you and best regards! |
Hi all - I've just returned to a project I was working on earlier in the year and have encountered the same issue as @ElToberino and it seems I'm using the same code as they are. Here's my code:
I know I sourced a lot of my code from Andreas Spiess, who is quite prolific in the ESP community. His demo can be found here: https://github.com/SensorsIot/NTP-time-for-ESP8266-and-ESP32/blob/master/NTP_Example/NTP_Example.ino I absolutely appreciate the work that you all do but I did want to add my weight to the argument that perhaps this should be considered a breaking change as I've seen that #7357 won't be merged. In any case, thank you to all in this thread as it enables me to update my code to remain functional! |
@cjastone @ElToberino I don't know why Can you try with |
@d-a-v no luck with the Honestly - I'm not mad about the change itself - it's a much cleaner and more readable solution, however I suspect that the code may be in much wider use. If nothing else, the changelog was the first place I looked when my code broke, but I didn't find any relevant breaking changes listed. Maybe an update to the changelog is the easiest approach here? |
EDIT: this is not a good example - Reference are in shipped examples, namely NTP-TZ-DST.ino. I just tried the snipped above, here's the complete sketch:
There is no doc about TZ, so we can't really say it's a breaking change. Only the NTP-TZ-DST example is up to date according to what's in the core. I'd like to be able to reproduce you issue first. |
I've also recompiled the NTP-TZ-DST example from release 2.6.3 and it's still working with current master. |
Thanks for your work - it's really strange; perhaps it interferes with other tasks running simultaniously? But never mind - the solution you gave us is really fine and a nice and simple workaround. |
EDIT:
Reference is in shipped examples, namely NTP-TZ-DST.ino.
Basic Infos
Platform
Settings in IDE
Problem Description
The follwing two code snippets worked fine with V 2.6.3:
or, in changed order:
It always delivered the right local time.
With the current version, this seems to be broken - in a very strange way: Only the first call of the time function delivers the right local time, all following time server calls don't set the local time and the function delivers UTC time only. I read the changelog and searched the issues, but I coludn't find any explanation. Has there been a change regarding the definition of the local timezone or within the setenv function?
If required, here's the complete code of my time function which worked very well with V 2.6.3:
The text was updated successfully, but these errors were encountered: