Skip to content
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

Hour jumping #8

Open
valknut89 opened this issue Nov 30, 2020 · 21 comments
Open

Hour jumping #8

valknut89 opened this issue Nov 30, 2020 · 21 comments

Comments

@valknut89
Copy link
Contributor

I think I found a mistake. I have a grid in Config of 10×11 and DE_alt.
The the hour jumps back and forth between the correct hour and an hour before. every two minutes

@fabmsg
Copy link

fabmsg commented Nov 30, 2020

I have been facing that issue for some time. What did you change to correct it?

@achkoe
Copy link

achkoe commented Nov 30, 2020

I am facing this issue too. For example between 19:25 and 19:26 there seems to be a difference of 1 hour in displayed time.

@valknut89
Copy link
Contributor Author

valknut89 commented Nov 30, 2020

we debugged the time.cpp and found that the time zone query changes between 0 and 3600. the HTTP return is sometimes incorrect. So we changed the void loop() and set a fix time in seconds

"void Time::loop() {
Time::ntpClient.update();

int h = Time::ntpClient.getHours();
int m = Time::ntpClient.getMinutes();

if(m != Time::minute) {
if(m == 0 && h == Time::hour) {
h = (h + 1) % 24;
}

Time::hour = h;
Time::minute = m; 
Grid::setTime(Time::hour, Time::minute);
Time::ntpClient.setTimeOffset(3600);
Serial.println(h);

}
"

@napsio
Copy link
Collaborator

napsio commented Dec 2, 2020

Do you use the stable version (4.0.1) or the master branch?

@SehlingS
Copy link
Contributor

SehlingS commented Dec 4, 2020

Do you use the stable version (4.0.1) or the master branch?

I have the same problem with the master branch 4.0.1. But i think, only when i have activate the automatic time zone.

@valknut89
Copy link
Contributor Author

Do you use the stable version (4.0.1) or the master branch?

I can only download one branch from here. So I took this branch

@fabmsg
Copy link

fabmsg commented Dec 6, 2020

Is it possible to fix the timezone? I cannot change it because is greyed out
image

@SehlingS
Copy link
Contributor

SehlingS commented Dec 7, 2020

Is it possible to fix the timezone? I cannot change it because is greyed out
image

You have to restart the device after you set it to inaktiv. then you have the possibility to change the time zone to mabey +1

@ibrot
Copy link

ibrot commented Dec 8, 2020

Hi,

I had the same issue a while ago. Back then it was jumping between 0 and 7200 because of the daylight saving time.

I fixed it that I did not use 0 as a fallback for the timezone, but using the last known timezone if we get a bad response from the time zone provider.

I created a pull-request #10 , you might want to look into it ;)

@napsio
Copy link
Collaborator

napsio commented Dec 12, 2020

This might be only an issue for the master branch. The release 4.0.1 does not have automatic timezones. I'll check the #10 pull-request.

@valknut89
Copy link
Contributor Author

where can i download 4.0.1 ?

@napsio
Copy link
Collaborator

napsio commented Dec 12, 2020

Look at: https://github.com/panbachi/wordclock/releases

@valknut89
Copy link
Contributor Author

thank you for your great work

@valknut89 valknut89 reopened this Dec 16, 2020
@valknut89
Copy link
Contributor Author

In Master-Branch the Option "Automatische Zeitzone" is reset to "Aktiv" after set "Inaktiv" and coldstart ESP.

@SehlingS
Copy link
Contributor

i can confirm that, but the automatic will work fine with the last changes from ibrot.

@LoenzeDoenz
Copy link

"Automatische Zeitzone" for me in germany is not working.. offset is not correct. Also Manual offset is not working.

@SehlingS
Copy link
Contributor

SehlingS commented Dec 19, 2020

I can send you a ready to flash bin to test it out.
Maybe you use other libarys.

wordclock.ino.d1_mini.bin_11x11_de_DE_Gridfirst2_gridsingleminute1.zip

@valknut89 valknut89 reopened this Dec 19, 2020
@p3moto
Copy link

p3moto commented Jan 3, 2021

we debugged the time.cpp and found that the time zone query changes between 0 and 3600. the HTTP return is sometimes incorrect. So we changed the void loop() and set a fix time in seconds

"void Time::loop() {
Time::ntpClient.update();

int h = Time::ntpClient.getHours();
int m = Time::ntpClient.getMinutes();

if(m != Time::minute) {
if(m == 0 && h == Time::hour) {
h = (h + 1) % 24;
}

Time::hour = h;
Time::minute = m; 
Grid::setTime(Time::hour, Time::minute);
Time::ntpClient.setTimeOffset(3600);
Serial.println(h);

}
"

also with this one the automatic modus ist still one hour wrong..
is shows "9:00" but should be "10:00".

edit: it still jumps

@valknut89
Copy link
Contributor Author

we debugged the time.cpp and found that the time zone query changes between 0 and 3600. the HTTP return is sometimes incorrect. So we changed the void loop() and set a fix time in seconds
"void Time::loop() {
Time::ntpClient.update();
int h = Time::ntpClient.getHours();
int m = Time::ntpClient.getMinutes();
if(m != Time::minute) {
if(m == 0 && h == Time::hour) {
h = (h + 1) % 24;
}

Time::hour = h;
Time::minute = m; 
Grid::setTime(Time::hour, Time::minute);
Time::ntpClient.setTimeOffset(3600);
Serial.println(h);

}
"

also with this one the automatic modus ist still one hour wrong.. but is seems to be constantly wrong and dosent jump anymore
is shows "9:00" but should be "10:00".

With this version there is no automatic mode. It isn't wrong, it is fixed to a special timezone. The webinterface has to ne changed too With this time.cpp.

@p3moto
Copy link

p3moto commented Jan 4, 2021

we debugged the time.cpp and found that the time zone query changes between 0 and 3600. the HTTP return is sometimes incorrect. So we changed the void loop() and set a fix time in seconds
"void Time::loop() {
Time::ntpClient.update();
int h = Time::ntpClient.getHours();
int m = Time::ntpClient.getMinutes();
if(m != Time::minute) {
if(m == 0 && h == Time::hour) {
h = (h + 1) % 24;
}

Time::hour = h;
Time::minute = m; 
Grid::setTime(Time::hour, Time::minute);
Time::ntpClient.setTimeOffset(3600);
Serial.println(h);

}
"

also with this one the automatic modus ist still one hour wrong..
is shows "9:00" but should be "10:00".

edit: it still jumps

With this version there is no automatic mode. It isn't wrong, it is fixed to a special timezone. The webinterface has to ne changed too With this time.cpp.

the time still jumpes...

i added this lines
Time::ntpClient.setTimeOffset(3600);
Serial.println(h);
in the code of the time.cpp, like:
grafik

"The webinterface has to be changed too With this time.cpp."
no it did not change anything there... still could use automatic timezone

maybe i missunderstood sth. i dont have a clue of C++.

@valknut89
Copy link
Contributor Author

valknut89 commented Jan 4, 2021

we debugged the time.cpp and found that the time zone query changes between 0 and 3600. the HTTP return is sometimes incorrect. So we changed the void loop() and set a fix time in seconds
"void Time::loop() {
Time::ntpClient.update();
int h = Time::ntpClient.getHours();
int m = Time::ntpClient.getMinutes();
if(m != Time::minute) {
if(m == 0 && h == Time::hour) {
h = (h + 1) % 24;
}

Time::hour = h;
Time::minute = m; 
Grid::setTime(Time::hour, Time::minute);
Time::ntpClient.setTimeOffset(3600);
Serial.println(h);

}
"

also with this one the automatic modus ist still one hour wrong..
is shows "9:00" but should be "10:00".
edit: it still jumps

With this version there is no automatic mode. It isn't wrong, it is fixed to a special timezone. The webinterface has to ne changed too With this time.cpp.

the time still jumpes...

i added this lines
Time::ntpClient.setTimeOffset(3600);
Serial.println(h);
in the code of the time.cpp, like:
grafik

"The webinterface has to be changed too With this time.cpp."
no it did not change anything there... still could use automatic timezone

maybe i missunderstood sth. i dont have a clue of C++.

pls have a look at #9 (comment) and you have to delete line 31-34 in your code, insert line "Time::ntpClient.setTimeOffset(3600);" also to setup in time.cpp
You can try the version 4.0.1. There is no auto-timezone

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

No branches or pull requests

8 participants