-
Notifications
You must be signed in to change notification settings - Fork 379
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
getFormattedTime does not give date+time string #139
Comments
Get this issue too - now using ESP8266 Core 3.0.0. Great to get a fix! |
Not only does getFormattedTime() not give the date, the time is often invalid, because the digits for minutes are reversed! On Arduino 1.8.15/ESP32 v2.0.0-rc-1 Indeed it is. Look at the output of this code:
it prints:
It's hilarious! I will post it on the ESP32 thread (if not already done so) The problem can be fixed in your getFormattedTime() code to change the type of the variables hours, minutes and seconds from unsigned long to unsigned short, which is more than enough for those values [0-59].
|
use getFomattedDate() from this fork: https://github.com/taranais/NTPClient |
Hi,
in version 3.2 getFormattedTime gives only the time, e.g. 17:35:27 and not the complete String including the date, e.g. 2021-05-16T17:35:27Z.
Anyway to get the date?
cheers
.d
The text was updated successfully, but these errors were encountered: