Diff for /parser3/src/classes/date.C between versions 1.55 and 1.56

version 1.55, 2003/11/20 17:07:43 version 1.56, 2003/11/20 17:09:35
Line 91  static int NN_year_to_NNNN(int year) { Line 91  static int NN_year_to_NNNN(int year) {
         const char* min=lsplit(&cur, ':');          const char* min=lsplit(&cur, ':');
         const char* sec=cur;          const char* sec=cur;
   
         tm tmIn;  memset(tmIn, 0, sizeof(tmIn));          tm tmIn;  memset(&tmIn, 0, sizeof(tmIn));
         tmIn.tm_isdst=-1;          tmIn.tm_isdst=-1;
         if(!month)          if(!month)
                 if(min) {                  if(min) {
Line 138  static void _create(Request& r, MethodPa Line 138  static void _create(Request& r, MethodPa
                                         "invalid datetime");                                          "invalid datetime");
                 }                  }
         } else if(params.count()>=2) { // ^create(y;m;d[;h[;m[;s]]])          } else if(params.count()>=2) { // ^create(y;m;d[;h[;m[;s]]])
                 tm tmIn; memset(tmIn, 0, sizeof(tmIn));                  tm tmIn; memset(&tmIn, 0, sizeof(tmIn));
                 tmIn.tm_isdst=-1;                  tmIn.tm_isdst=-1;
                 tmIn.tm_year=NN_year_to_NNNN(params.as_int(0, "year must be int", r));                  tmIn.tm_year=NN_year_to_NNNN(params.as_int(0, "year must be int", r));
                 tmIn.tm_mon=params.as_int(1, "month must be int", r)-1;                  tmIn.tm_mon=params.as_int(1, "month must be int", r)-1;
Line 258  static Table& fill_month_days(Request& r Line 258  static Table& fill_month_days(Request& r
         int month=max(1, min(params.as_int(2, "month must be int", r), 12)) -1;          int month=max(1, min(params.as_int(2, "month must be int", r), 12)) -1;
                   
         tm tmIn;            tm tmIn;  
         memset(tmIn, 0, sizeof(tmIn));           memset(&tmIn, 0, sizeof(tmIn)); 
         tmIn.tm_mday=1;          tmIn.tm_mday=1;
         tmIn.tm_mon=month;           tmIn.tm_mon=month; 
         tmIn.tm_yday=year-1900;          tmIn.tm_yday=year-1900;
Line 332  static Table& fill_week_days(Request& r, Line 332  static Table& fill_week_days(Request& r,
         int day=params.as_int(3, "day must be int", r);          int day=params.as_int(3, "day must be int", r);
                   
         tm tmIn;          tm tmIn;
         memset(tmIn, 0, sizeof(tmIn));           memset(&tmIn, 0, sizeof(tmIn)); 
         tmIn.tm_hour=18;          tmIn.tm_hour=18;
         tmIn.tm_mday=day;          tmIn.tm_mday=day;
         tmIn.tm_mon=month;           tmIn.tm_mon=month; 

Removed from v.1.55  
changed lines
  Added in v.1.56


E-mail: