arduino / arduino/ArduinoCore-avr

eu_dst.h wrong calculation od Daylight Saving Time

Open
#277 8 comments 0 reactions 0 assignees View on GitHub
waiting for feedback
Dominant language
C
Stars
1.5k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Calculation use wrong conditions. Please correct
if (month == MARCH) {
if (mday < d)
return 0;
if (mday > d)
return ONE_HOUR;
if (hour < 2)
return 0;
return ONE_HOUR;
}
if (mday < d)
return ONE_HOUR;
if (mday > d)
return 0;
if (hour < 2)
return ONE_HOUR;
return 0;

And check also usa_dst.h if there isn't similar error
Vladimir

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading eu_dst.h and compare its March and non-March conditions with the issue’s expected transitions. Then inspect usa_dst.h for the same kind of boundary error. Done means the European calculation is corrected and any equivalent USA error is addressed, with DST behavior checked at the stated day and hour boundaries.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.