Mercurial > urweb
comparison src/c/urweb.c @ 994:7932d577cf78
Initial versioned1 demo working
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 06 Oct 2009 15:59:11 -0400 |
parents | 733f67bb64e7 |
children | 166ea3944b91 |
comparison
equal
deleted
inserted
replaced
993:10114d7b7477 | 994:7932d577cf78 |
---|---|
2158 char *r, *s; | 2158 char *r, *s; |
2159 struct tm stm; | 2159 struct tm stm; |
2160 | 2160 |
2161 if (localtime_r(&t, &stm)) { | 2161 if (localtime_r(&t, &stm)) { |
2162 s = uw_malloc(ctx, TIMES_MAX); | 2162 s = uw_malloc(ctx, TIMES_MAX); |
2163 --stm.tm_hour; | |
2164 len = strftime(s, TIMES_MAX, TIME_FMT, &stm); | 2163 len = strftime(s, TIMES_MAX, TIME_FMT, &stm); |
2165 r = uw_malloc(ctx, len + 14); | 2164 r = uw_malloc(ctx, len + 14); |
2166 sprintf(r, "'%s'::timestamp", s); | 2165 sprintf(r, "'%s'::timestamp", s); |
2167 return r; | 2166 return r; |
2168 } else | 2167 } else |