summaryrefslogtreecommitdiff
path: root/server/util_time.c
diff options
context:
space:
mode:
authorBrian Pane <brianp@apache.org>2002-04-21 08:41:01 +0000
committerBrian Pane <brianp@apache.org>2002-04-21 08:41:01 +0000
commit292fbad5b2ecd7956b3dd223e9510cf0739d1bf0 (patch)
tree7df47dd0642e30bc943df5dfe3ec3eca0dee2099 /server/util_time.c
parent166b62f9c5d52727e950db8e9160184fdc6c8b63 (diff)
downloadhttpd-292fbad5b2ecd7956b3dd223e9510cf0739d1bf0.tar.gz
Use the day and month names exported from APR, rather than duplicating them
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94736 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/util_time.c')
-rw-r--r--server/util_time.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/server/util_time.c b/server/util_time.c
index ec9400de40..48683a35c8 100644
--- a/server/util_time.c
+++ b/server/util_time.c
@@ -219,15 +219,6 @@ AP_DECLARE(apr_status_t) ap_recent_ctime(char *date_str, apr_time_t t)
return APR_SUCCESS;
}
-static const char month_snames[12][4] =
-{
- "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
-};
-static const char day_snames[7][4] =
-{
- "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
-};
-
AP_DECLARE(apr_status_t) ap_recent_rfc822_date(char *date_str, apr_time_t t)
{
/* ### This code is a clone of apr_rfc822_date(), except that it
@@ -242,7 +233,7 @@ AP_DECLARE(apr_status_t) ap_recent_rfc822_date(char *date_str, apr_time_t t)
/* example: "Sat, 08 Jan 2000 18:31:41 GMT" */
/* 12345678901234567890123456789 */
- s = &day_snames[xt.tm_wday][0];
+ s = &apr_day_snames[xt.tm_wday][0];
*date_str++ = *s++;
*date_str++ = *s++;
*date_str++ = *s++;
@@ -251,7 +242,7 @@ AP_DECLARE(apr_status_t) ap_recent_rfc822_date(char *date_str, apr_time_t t)
*date_str++ = xt.tm_mday / 10 + '0';
*date_str++ = xt.tm_mday % 10 + '0';
*date_str++ = ' ';
- s = &month_snames[xt.tm_mon][0];
+ s = &apr_month_snames[xt.tm_mon][0];
*date_str++ = *s++;
*date_str++ = *s++;
*date_str++ = *s++;