|
|
| version 1.96, 2015/09/21 22:37:36 | version 1.98, 2015/09/22 23:41:19 |
|---|---|
| Line 50 Table date_calendar_table_template(new D | Line 50 Table date_calendar_table_template(new D |
| static void _now(Request& r, MethodParams& params) { | static void _now(Request& r, MethodParams& params) { |
| VDate& vdate=GET_SELF(r, VDate); | VDate& vdate=GET_SELF(r, VDate); |
| time_t t=time(0); | pa_time_t t=(pa_time_t)time(0); |
| if(params.count()==1) // ^now(offset) | if(params.count()==1) // ^now(offset) |
| t+=(time_t)round(params.as_double(0, "offset must be double", r)*SECS_PER_DAY); | t+=(pa_time_t)round(params.as_double(0, "offset must be double", r)*SECS_PER_DAY); |
| vdate.set_time(t); | vdate.set_time(t); |
| } | } |
| Line 160 static char *numeric_tz(char prefix, cha | Line 160 static char *numeric_tz(char prefix, cha |
| char *buf=new(PointerFreeGC) char[size]; | char *buf=new(PointerFreeGC) char[size]; |
| strcpy(buf, prefix=='+' ? "SUB-":"SUB+"); | strcpy(buf, prefix=='+' ? "SUB-":"SUB+"); |
| strncpy(buf+4, tz, cur-tz); | strncpy(buf+4, tz, cur-tz); |
| buf[size]=0; | buf[size-1]=0; |
| return buf; | return buf; |
| } | } |