-
Notifications
You must be signed in to change notification settings - Fork 129
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
getTime appears to be returning the wrong date #284
Comments
I'm having the same or similar problem. 3 or 4 out of 100 devices I have in the field are suddenly showing times that are exactly 24 hours before the actual time. Using Adafruit Feather M0 with WINC 15000. This is causing significant problems. Any help would be greatly appreciated. |
In my case the problem turned out to be that the ATWINC1500 wifi module was running firmware v19.4.4. Microchip's revision notes indicate that version had problems of some sort with NTP servers. Upgrading the module's firmware to v19.5.4 or higher from the Arduino IDE fixed the problem. Let us know if that works for you. |
The problem persists on the ESP32 module on the MKR1010 and Nano33 IoT boards, though |
The ESP32 doesn't use WiFi101, does it? |
No, but the WiFi101 and the WiFiNINA modules share the same WiFi core API. Posted it here, but had hit the problem on both. |
Hi @tigoe i tried the sketch in the the wifi1010 firmware v1.3.0 and i get the same results of the fixed mkr1000 tomorrow when i'll get i'll try also the 33 iot |
@tigoe run on 33 Iot and works fine too |
Same issue as @tigoe mentioned here - it suddenly changed to a wrong time during measuring. How to fix it? I don't see a higher version of firmware in Arduino software for NANO 33 IoT board - the latest version is version 1.4.5. Thank you very much in advance! |
For my case, I just figured out the example code I'm using sets:
but set_hour cannot be negative, so I fix the code by deleting GMT in the above line and converting UTC to GMT like this:
Sorry, I didn't see your code posted. It seems it didn't convert UTC to GMT. Here's my entire code:
|
Thanks, I'll give that a go. I had found a way around this awhile ago, but
it's always nice to see a different solution, so thank you for that.
…On Sun, Jun 27, 2021 at 1:04 AM yanliu888 ***@***.***> wrote:
I just figured out maybe the example code you are using sets:
set_hour = rtc_wifi.getHours() + GMT;
but set_hour cannot be negative, so can fix the code like this by deleting
GMT in the above line and converting UTC to GMT like this:
rtc_wifi.setEpoch(epoch + GMT * 60 *60);
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#284 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC45H3UIW7GSQFIHN7IZ7TTU2WOLANCNFSM4KFT3TVA>
.
|
WIFi.getTime() appears to be returning the wrong date by one day.
Using this code, I should be getting 11/1/2020 today, but I am getting 10/1/2020. I'm not clear on why, but the time is correct.
Running this on a MKR1000, library version 0.16.0
The text was updated successfully, but these errors were encountered: