Skip to content
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

sntp_localtime() is returning incorrect value in tm_isdst. #2010

Closed
mlord opened this issue May 9, 2016 · 0 comments
Closed

sntp_localtime() is returning incorrect value in tm_isdst. #2010

mlord opened this issue May 9, 2016 · 0 comments

Comments

@mlord
Copy link

mlord commented May 9, 2016

----------------------------- 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants