From: Sander Striker Date: Sat, 13 Apr 2002 12:02:38 +0000 (+0000) Subject: Adapt to the rename of apr_explode_localtime to apr_time_exp_lt in APR. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c6901fc0f29c43726bd3f927a5eab86ad4e2fbb9;p=apache Adapt to the rename of apr_explode_localtime to apr_time_exp_lt in APR. Submitted by: Thom May git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94631 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index 4848ffc227..031045ca4e 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -1682,7 +1682,7 @@ static void output_directories(struct ent **ar, int n, 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); @@ -1765,7 +1765,7 @@ static void output_directories(struct ent **ar, int n, 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); diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 83b7a8f258..3471f9a4e4 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -3244,7 +3244,7 @@ static char *current_logtime(request_rec *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]", @@ -3527,12 +3527,12 @@ static char *lookup_variable(request_rec *r, char *var) /* 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) { @@ -3554,7 +3554,7 @@ static char *lookup_variable(request_rec *r, char *var) 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, diff --git a/modules/ssl/ssl_engine_log.c b/modules/ssl/ssl_engine_log.c index 014dac69c7..e30a3b817b 100644 --- a/modules/ssl/ssl_engine_log.c +++ b/modules/ssl/ssl_engine_log.c @@ -212,7 +212,7 @@ void ssl_log(server_rec *s, int level, const char *msg, ...) 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()); diff --git a/server/util.c b/server/util.c index 86a3c9f302..85bb370403 100644 --- a/server/util.c +++ b/server/util.c @@ -180,7 +180,7 @@ AP_DECLARE(char *) ap_ht_time(apr_pool_t *p, apr_time_t t, const char *fmt, int fmt = tf; } else { - apr_explode_localtime(&xt, t); + apr_time_exp_lt(&xt, t); } /* check return code? */ diff --git a/server/util_time.c b/server/util_time.c index e9131a1602..7a0880953b 100644 --- a/server/util_time.c +++ b/server/util_time.c @@ -133,7 +133,7 @@ static apr_status_t cached_explode(apr_time_exp_t *xt, apr_time_t t, return apr_time_exp_gmt(xt, t); } else { - return apr_explode_localtime(xt, t); + return apr_time_exp_lt(xt, t); } } else { @@ -148,7 +148,7 @@ static apr_status_t cached_explode(apr_time_exp_t *xt, apr_time_t t, 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; @@ -177,7 +177,7 @@ AP_DECLARE(apr_status_t) ap_explode_recent_gmt(apr_time_exp_t * tm, 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;