| 218 | } |
| 219 | |
| 220 | static void print_date(status_ctx *ctx, apr_time_t timestamp, const char *title) |
| 221 | { |
| 222 | apr_bucket_brigade *bb = ctx->bb; |
| 223 | if (timestamp > 0) { |
| 224 | char ts[128]; |
| 225 | char ts2[128]; |
| 226 | apr_time_exp_t texp; |
| 227 | apr_size_t len; |
| 228 | |
| 229 | apr_time_exp_gmt(&texp, timestamp); |
| 230 | apr_strftime(ts, &len, sizeof(ts2)-1, "%Y-%m-%d", &texp); |
| 231 | ts[len] = '\0'; |
| 232 | if (!title) { |
| 233 | apr_strftime(ts2, &len, sizeof(ts)-1, "%Y-%m-%dT%H:%M:%SZ", &texp); |
| 234 | ts2[len] = '\0'; |
| 235 | title = ts2; |
| 236 | } |
| 237 | if (HTML_STATUS(ctx)) { |
| 238 | apr_brigade_printf(bb, NULL, NULL, |
| 239 | "<span title='%s' style='white-space: nowrap;'>%s</span>", |
| 240 | ap_escape_html2(bb->p, title, 1), ts); |
| 241 | } |
| 242 | else { |
| 243 | apr_brigade_printf(bb, NULL, NULL, "%s%s: %s\n", |
| 244 | ctx->prefix, title, ts); |
| 245 | } |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | static void print_time(status_ctx *ctx, const char *label, apr_time_t t) |
| 250 | { |
no test coverage detected