if (ar[x]->lm != -1) {
char time_str[MAX_STRING_LEN];
apr_time_exp_t ts;
- apr_explode_localtime(&ts, ar[x]->lm);
+ apr_time_exp_lt(&ts, ar[x]->lm);
apr_strftime(time_str, &rv, MAX_STRING_LEN,
"</td><td align=\"right\">%d-%b-%Y %H:%M ", &ts);
ap_rputs(time_str, r);
if (ar[x]->lm != -1) {
char time_str[MAX_STRING_LEN];
apr_time_exp_t ts;
- apr_explode_localtime(&ts, ar[x]->lm);
+ apr_time_exp_lt(&ts, ar[x]->lm);
apr_strftime(time_str, &rv, MAX_STRING_LEN,
"%d-%b-%Y %H:%M ", &ts);
ap_rputs(time_str, r);
char tstr[80];
apr_size_t len;
- apr_explode_localtime(&t, apr_time_now());
+ apr_time_exp_lt(&t, apr_time_now());
apr_strftime(tstr, &len, 80, "[%d/%b/%Y:%H:%M:%S ", &t);
apr_snprintf(tstr + strlen(tstr), 80-strlen(tstr), "%c%.2d%.2d]",
/* XXX: wow this has gotta be slow if you actually use it for a lot, recalculates exploded time for each variable */
/* underlaying Unix system stuff */
else if (strcasecmp(var, "TIME_YEAR") == 0) {
- apr_explode_localtime(&tm, apr_time_now());
+ apr_time_exp_lt(&tm, apr_time_now());
apr_snprintf(resultbuf, sizeof(resultbuf), "%04d", tm.tm_year + 1900);
result = resultbuf;
}
#define MKTIMESTR(format, tmfield) \
- apr_explode_localtime(&tm, apr_time_now()); \
+ apr_time_exp_lt(&tm, apr_time_now()); \
apr_snprintf(resultbuf, sizeof(resultbuf), format, tm.tmfield); \
result = resultbuf;
else if (strcasecmp(var, "TIME_MON") == 0) {
MKTIMESTR("%d", tm_wday)
}
else if (strcasecmp(var, "TIME") == 0) {
- apr_explode_localtime(&tm, apr_time_now());
+ apr_time_exp_lt(&tm, apr_time_now());
apr_snprintf(resultbuf, sizeof(resultbuf),
"%04d%02d%02d%02d%02d%02d", tm.tm_year + 1900,
tm.tm_mon+1, tm.tm_mday,
if (add & SSL_NO_TIMESTAMP)
tstr[0] = NUL;
else {
- apr_explode_localtime(&t, apr_time_now());
+ apr_time_exp_lt(&t, apr_time_now());
apr_strftime(tstr, &len, 80, "[%d/%b/%Y %H:%M:%S", &t);
apr_snprintf(tstr + strlen(tstr), 80 - strlen(tstr), " %05d] ",
(unsigned int)getpid());
fmt = tf;
}
else {
- apr_explode_localtime(&xt, t);
+ apr_time_exp_lt(&xt, t);
}
/* check return code? */
return apr_time_exp_gmt(xt, t);
}
else {
- return apr_explode_localtime(xt, t);
+ return apr_time_exp_lt(xt, t);
}
}
else {
r = apr_time_exp_gmt(xt, t);
}
else {
- r = apr_explode_localtime(xt, t);
+ r = apr_time_exp_lt(xt, t);
}
if (!APR_STATUS_IS_SUCCESS(r)) {
return r;
AP_DECLARE(apr_status_t) ap_recent_ctime(char *date_str, apr_time_t t)
{
/* ### This code is a clone of apr_ctime(), except that it
- * uses ap_explode_recent_localtime() instead of apr_explode_localtime().
+ * uses ap_explode_recent_localtime() instead of apr_time_exp_lt().
*/
apr_time_exp_t xt;
const char *s;