Diff for /parser3/src/classes/date.C between versions 1.86 and 1.88

version 1.86, 2009/06/14 00:33:36 version 1.88, 2010/09/16 23:29:41
Line 19  static const char * const IDENT_DATE_C=" Line 19  static const char * const IDENT_DATE_C="
   
 class MDate: public Methoded {  class MDate: public Methoded {
 public: // VStateless_class  public: // VStateless_class
         Value* create_new_value(Pool&, HashStringValue*) { return new VDate(0); }          Value* create_new_value(Pool&) { return new VDate(0); }
   
 public:  public:
         MDate();          MDate();
Line 154  static void _create(Request& r, MethodPa Line 154  static void _create(Request& r, MethodPa
   
 static void _sql_string(Request& r, MethodParams&) {  static void _sql_string(Request& r, MethodParams&) {
         VDate& vdate=GET_SELF(r, VDate);          VDate& vdate=GET_SELF(r, VDate);
         int size=1+ 4+1+2+1+2 +1+ 2+1+2+1+2 +1 +1;  
         char *buf=new(PointerFreeGC) char[size];  
         size=strftime(buf, size, "%Y-%m-%d %H:%M:%S", &vdate.get_localtime());  
   
         r.write_assign_lang(String(buf));          r.write_assign_lang(*vdate.get_sql_string());
 }  }
   
 static void _gmt_string(Request& r, MethodParams&) {  static void _gmt_string(Request& r, MethodParams&) {
         VDate& vdate=GET_SELF(r, VDate);          VDate& vdate=GET_SELF(r, VDate);
   
         time_t when=vdate.get_time();          r.write_assign_lang(*vdate.get_gmt_string());
           
         r.write_assign_lang(String(date_gmt_string(gmtime(&when))));  
 }  }
   
 static void _roll(Request& r, MethodParams& params) {  static void _roll(Request& r, MethodParams& params) {

Removed from v.1.86  
changed lines
  Added in v.1.88


E-mail: