Fix __dt_to_string primitive function.
--- a/lib/iec_std_lib.h Tue Apr 24 16:49:43 2012 +0200
+++ b/lib/iec_std_lib.h Wed May 02 14:46:48 2012 +0200
@@ -568,16 +568,16 @@
}
if(IN.tv_nsec == 0){
res.len = snprintf((char*)&res.body, STR_MAX_LEN, "DT#%d-%2.2d-%2.2d-%2.2d:%2.2d:%d",
- broken_down_time->tm_year,
- broken_down_time->tm_mon,
+ broken_down_time->tm_year + 1900,
+ broken_down_time->tm_mon + 1,
broken_down_time->tm_mday,
broken_down_time->tm_hour,
broken_down_time->tm_min,
broken_down_time->tm_sec);
}else{
res.len = snprintf((char*)&res.body, STR_MAX_LEN, "DT#%d-%2.2d-%2.2d-%2.2d:%2.2d:%g",
- broken_down_time->tm_year,
- broken_down_time->tm_mon,
+ broken_down_time->tm_year + 1900,
+ broken_down_time->tm_mon + 1,
broken_down_time->tm_mday,
broken_down_time->tm_hour,
broken_down_time->tm_min,