OS5.15 complaint NTP library
Dependents: Firebase-Example TCP-NTP-Server TCP-NTP-Server-OS5depreciated
Diff: NTPclient.cpp
- Revision:
- 1:a97d143dd94e
- Parent:
- 0:3854dc7bd4de
--- a/NTPclient.cpp Sun Mar 08 14:32:36 2020 +0000 +++ b/NTPclient.cpp Mon Jun 01 16:16:42 2020 +0000 @@ -114,12 +114,12 @@ uint32_t previousSunday = day - dow; if (month > 2 && month < 9){DST=3600;} - // DST starts 2nd Sunday of March; 2am - if (month == 2 && previousSunday >= 25 && hour >= 2){DST=3600;} - // DST ends 1st Sunday of November; 2am + // DST starts last Sunday of March; 2am (1am UTC) + if (month == 3 && previousSunday >= 25 && hour >= 2){DST=3600;} + // DST ends last Sunday of october; 2am (1am UTC) if (month == 9 && previousSunday < 25 && hour >= 2){DST=0;} } - if(setRTC){set_time(CETtime+DST+1);} // add extra second here for processing + if(setRTC){set_time(CETtime+DST);} m_sock.close(); return (CETtime+DST+1); }