8000 sntp_localtime() is returning incorrect value in tm_isdst. · Issue #2010 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content
sntp_localtime() is returning incorrect value in tm_isdst. #2010
Closed
@mlord

Description

@mlord

----------------------------- Remove above -----------------------------

Basic Infos

Hardware

Hardware: ?ESP-12?
Core Version: ?2.1.0-rc2?

Description

Problem description:

Arduino/tools/sdk/lwip/src/core/sntp.c

sntp_localtime() is returning incorrect value in tm_isdst.
It currently returns "0", which means "defintely not daylight savings time right now".
This is incorrect. The code it simply stuffing 0 in there as a default, but instead should be setting it to -1 to indicate "I don't know". Longer term, it should actually figure out whether to put a 0 or a 1 there, but for now it should be returning -1.

The current setting (0) results in incorrect time/timezone output in areas where DST is in effect.

Settings in IDE

Module: ?Generic ESP8266 Module?
Flash Size: ?4MB/1MB?
CPU Frequency: ?80Mhz?
Flash Mode: ?qio?
Flash Frequency: ?40Mhz?
Upload Using: ?OTA / SERIAL?
Reset Method: ?ck / nodemcu?

Sketch

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0