Skip to content

Commit

Permalink
Fixes a problem that would activate DST a day late.
Browse files Browse the repository at this point in the history
  • Loading branch information
ropg committed Oct 29, 2018
1 parent 91be8cc commit 189ec13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ezTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,8 @@ time_t Timezone::tzTime(time_t t, ezLocalOrUTC_t local_or_utc, String &tzname, b
ezt::breakTime(t, tm);

// in local time
time_t dst_start = ezt::makeOrdinalTime(start_time_hr, start_time_min, 0, start_week, start_dow, start_month, tm.Year + 1970);
time_t dst_end = ezt::makeOrdinalTime(end_time_hr, end_time_min, 0, end_week, end_dow, end_month, tm.Year + 1970);
time_t dst_start = ezt::makeOrdinalTime(start_time_hr, start_time_min, 0, start_week, start_dow + 1, start_month, tm.Year + 1970);
time_t dst_end = ezt::makeOrdinalTime(end_time_hr, end_time_min, 0, end_week, end_dow + 1, end_month, tm.Year + 1970);

if (local_or_utc == UTC_TIME) {
dst_start -= std_offset;
Expand Down

0 comments on commit 189ec13

Please sign in to comment.