|
|
| version 1.2, 2001/07/07 17:59:02 | version 1.4, 2001/07/18 10:06:04 |
|---|---|
| Line 51 static void _set(Request& r, const Strin | Line 51 static void _set(Request& r, const Strin |
| int year=params->as_int(0, r); | int year=params->as_int(0, r); |
| if(year<70) // 0..69 -> 100..169 [2000..2069] | if(year<70) // 0..69 -> 100..169 [2000..2069] |
| year+=100; | year+=100; |
| if(year>=1900) | |
| year-=1900; | |
| tmIn.tm_year=year; | tmIn.tm_year=year; |
| tmIn.tm_mon=params->as_int(1, r)-1; | tmIn.tm_mon=params->as_int(1, r)-1; |
| tmIn.tm_mday=params->as_int(2, r); | tmIn.tm_mday=params->as_int(2, r); |
| Line 77 static void _string(Request& r, const St | Line 79 static void _string(Request& r, const St |
| time_t time=vdate->get_time(); | time_t time=vdate->get_time(); |
| size=strftime(buf, size, "'%Y-%m-%d %H:%M:%S'", gmtime(&time)); | size=strftime(buf, size, "'%Y-%m-%d %H:%M:%S'", gmtime(&time)); |
| Value& result=*new(pool) VString(*new(pool) String(pool, buf, size)); | String& string=*new(pool) String(pool); |
| string.APPEND_CLEAN(buf, size, | |
| method_name.origin().file, | |
| method_name.origin().line); | |
| Value& result=*new(pool) VString(string); | |
| r.write_assign_lang(result); | r.write_assign_lang(result); |
| } | } |