You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following function to calculate the civil dawn time:
#include <ezTime.h>
#include <ESP8266WiFi.h>
#include <SolarCalculator.h>
calculate dawn(t){
Serial.println("calculating dawn");
Serial.println("time passed to calculate dawn: " + dateTime(t));
double tr, dawn, dusk;
calcCivilDawnDusk(t, latitude, longitude, tr, dawn, dusk);
Serial.println("t after calculation: " + dateTime(t));
dawn += 1.0;//needs to be offset
Serial.print("day t: ");
Serial.println(day(t));//this prints the wrong value, 21(today) instead of 22 on my test run
....
}
I got some suspicious result, that's why i inserted the print statements and i got the following:
calculating dawn
time passed to calculate dawn: Tuesday, 22-Nov-2022 00:00:01 CET
t after calculation: Tuesday, 22-Nov-2022 00:00:01 CET
day t: 21
It seems that day(t) ignores the t parameter and uses the current time.
If this is my error that i missed somewhere i apologize and I'll be grateful if you point it out to me
The text was updated successfully, but these errors were encountered:
I have the following function to calculate the civil dawn time:
I got some suspicious result, that's why i inserted the print statements and i got the following:
It seems that day(t) ignores the t parameter and uses the current time.
If this is my error that i missed somewhere i apologize and I'll be grateful if you point it out to me
The text was updated successfully, but these errors were encountered: