We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
#111 # Description
The day value gets corrupted by makeTime
convert a time element structure to a time and inspect the day value. It changed.
LoLin ESP8266 Arduino IDE version 1.8.13 Version info & package name (from Tools > Boards > Board Manager) 1.6.0
#include <TimeLib.h> void setup() { Serial.begin(115200); delay(1000); tmElements_t start; start.Year = 2020-1970; Serial.print("year "); Serial.println(start.Year); start.Month = 11; start.Day = 2; Serial.print("day "); Serial.println(start.Day); // prints 2 - correct time_t startdate = makeTime(start); Serial.print("converted day "); Serial.println(day(startdate)); // prints 12 - incorrect Serial.print("month "); Serial.println(month(startdate)); // prints 11 as expected Serial.print("year "); Serial.println(year(startdate)); // prints 2020 as expected } void loop() { }
09:27:13.596 -> year 50 09:27:13.596 -> day 2 09:27:13.596 -> converted day 12 09:27:13.596 -> month 11 09:27:13.596 -> year 2020
The text was updated successfully, but these errors were encountered:
No branches or pull requests
#111 # Description
The day value gets corrupted by makeTime
Steps To Reproduce Problem
convert a time element structure to a time and inspect the day value. It changed.
Hardware & Software
LoLin ESP8266
Arduino IDE version 1.8.13
Version info & package name (from Tools > Boards > Board Manager) 1.6.0
Arduino Sketch
Errors or Incorrect Output
09:27:13.596 -> year 50
09:27:13.596 -> day 2
09:27:13.596 -> converted day 12
09:27:13.596 -> month 11
09:27:13.596 -> year 2020
The text was updated successfully, but these errors were encountered: