Diff for /parser3/src/classes/date.C between versions 1.28 and 1.29

version 1.28, 2002/04/25 14:35:20 version 1.29, 2002/04/25 14:40:24
Line 56  static void _create(Request& r, const St Line 56  static void _create(Request& r, const St
                 if(const String *sdate=params->get(0).get_string()) { // ^create[2002-04-25 18:14:00]                  if(const String *sdate=params->get(0).get_string()) { // ^create[2002-04-25 18:14:00]
                         char *cstr=sdate->cstr();                          char *cstr=sdate->cstr();
                         const char *year=lsplit(&cstr, '-');                          const char *year=lsplit(&cstr, '-');
                           if(!cstr) // there were no '-'
                                   throw Exception(0,
                                           sdate,
                                           "year&month parts of date abscent, must be in YYYY-NN-DD HH-MM-SS format");
                         const char *month=lsplit(&cstr, '-');                          const char *month=lsplit(&cstr, '-');
                         const char *mday=lsplit(&cstr, ' ');                          const char *mday=lsplit(&cstr, ' ');
                         const char *hour=lsplit(&cstr, ':');                          const char *hour=lsplit(&cstr, ':');
                         const char *min=lsplit(&cstr, ':');                          const char *min=lsplit(&cstr, ':');
                         const char *sec=cstr;                          const char *sec=cstr;
                         if(!year)  
                                 throw Exception(0,  
                                         sdate,  
                                         "no part of date specified, must be in YYYY-NN-DD HH-MM-SS format");  
                         tm tmIn={0};                          tm tmIn={0};
                         tmIn.tm_isdst=-1;                          tmIn.tm_isdst=-1;
                         tmIn.tm_year=NN_year_to_NNNN(atoi(year));                          tmIn.tm_year=NN_year_to_NNNN(atoi(year));

Removed from v.1.28  
changed lines
  Added in v.1.29


E-mail: