00001 /* Licensed to the Apache Software Foundation (ASF) under one or more 00002 * contributor license agreements. See the NOTICE file distributed with 00003 * this work for additional information regarding copyright ownership. 00004 * The ASF licenses this file to You under the Apache License, Version 2.0 00005 * (the "License"); you may not use this file except in compliance with 00006 * the License. You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00026 #ifndef APACHE_UTIL_TIME_H 00027 #define APACHE_UTIL_TIME_H 00028 00029 #include "apr.h" 00030 #include "apr_time.h" 00031 #include "httpd.h" 00032 00033 #ifdef __cplusplus 00034 extern "C" { 00035 #endif 00036 00037 /* Maximum delta from the current time, in seconds, for a past time 00038 * to qualify as "recent" for use in the ap_explode_recent_*() functions: 00039 * (Must be a power of two minus one!) 00040 */ 00041 #define AP_TIME_RECENT_THRESHOLD 15 00042 00054 AP_DECLARE(apr_status_t) ap_explode_recent_localtime(apr_time_exp_t *tm, 00055 apr_time_t t); 00056 00068 AP_DECLARE(apr_status_t) ap_explode_recent_gmt(apr_time_exp_t *tm, 00069 apr_time_t t); 00070 00071 00077 AP_DECLARE(apr_status_t) ap_recent_ctime(char *date_str, apr_time_t t); 00078 00084 AP_DECLARE(apr_status_t) ap_recent_rfc822_date(char *date_str, apr_time_t t); 00085 00086 #ifdef __cplusplus 00087 } 00088 #endif 00089 00090 #endif /* !APACHE_UTIL_TIME_H */ 00091