Fix date conversion function (seconds to Date_and_Time). First day of month was falling on previous month.
--- a/lib/C/iec_std_lib.h Wed Jan 25 19:50:39 2017 +0000
+++ b/lib/C/iec_std_lib.h Sun Feb 19 20:13:02 2017 +0000
@@ -318,7 +318,7 @@
days += __isleap(dt.tm_year) ? 366 : 365;
}
dt.tm_mon = 1;
- while (days > __mon_yday[__isleap(dt.tm_year)][dt.tm_mon]) {
+ while (days >= __mon_yday[__isleap(dt.tm_year)][dt.tm_mon]) {
dt.tm_mon += 1;
}
dt.tm_day = days - __mon_yday[__isleap(dt.tm_year)][dt.tm_mon - 1] + 1;