|
|
| version 1.87, 2009/08/08 13:30:20 | version 1.89, 2010/10/21 15:06:27 |
|---|---|
| Line 23 public: // VStateless_class | Line 23 public: // VStateless_class |
| public: | public: |
| MDate(); | MDate(); |
| public: // Methoded | |
| bool used_directly() { return true; } | |
| }; | }; |
| // global variable | // global variable |
| Line 154 static void _create(Request& r, MethodPa | Line 152 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) { |