PaulStoffregen/Time

12/31/2097

PythonEatsSQuirreL opened this issue · 1 comments

I am using esp32 and TinyGPS++ to save a csv file on my SD card with the time, date, alt, lng, lat. The CSV file is saved as created on 12/31/2097 and the year() month() day() hour() minute() seconds() is 2000-0-0 00:00:00.

Sometimes the year is 1999, sometimes 2000.

Any fixes?

First, leave the code you are using. is difficult to understand what you are doing without actually seeing it.

Second, you need to set a date and time. if you did this already, use Serial.println(now()) to print the time stamp, copy it and past on an epoch website (Like this one).

That's the date you have set, you can change it to whatever value you want, the library will just keep incrementing this value each second, you gotta set it first either using a RTC or NTC.