Skip to content

Incorrect date/year with ESP8266 board 3.0.0 #149

Open
@bartgrefte

Description

@bartgrefte

Recently I ran into the problem that the NTP-sketch from https://randomnerdtutorials.com/esp8266-nodemcu-date-time-ntp-client-server-arduino/ suddenly displays incorrect dates and year, time is correct. Example output before and after timesync:

08:29:15
Epoch Time: 2085985755
Month day: 6
Week Day: Thursday
Month: 8
Month name: August
Year: -3135390
Current date: -3135390-8-6

19:19:31
Epoch Time: 1622834371
Month day: 2
Week Day: Friday
Month: 12
Month name: December
Year: -3135405
Current date: -3135405-12-2

I thought I'd tracked down the cause of the problem, this issue appeared after having updated the ESP8266 boards platform to 3.0.0, downgrading it and reflashing the sketch solves the problem.

Yesterday I reported it at esp8266/Arduino#8118, but according to who responded, this problem is in the NTP library, it might have something to do with 32 and 64 bit time_t.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions