1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

Adapt to the rename of apr_explode_localtime to apr_time_exp_lt in APR.

Submitted by: Thom May <thom@planetarytramp.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94631 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sander Striker
2002-04-13 12:02:38 +00:00
parent 11c09e84f5
commit 6e8efec657
5 changed files with 11 additions and 11 deletions

View File

@@ -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,
"</td><td align=\"right\">%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);

View File

@@ -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,

View File

@@ -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());

View File

@@ -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? */

View File

@@ -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;