Apache2
util_time.h
Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
26 #ifndef APACHE_UTIL_TIME_H
27 #define APACHE_UTIL_TIME_H
28 
29 #include "apr.h"
30 #include "apr_time.h"
31 #include "httpd.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 /* Maximum delta from the current time, in seconds, for a past time
38  * to qualify as "recent" for use in the ap_explode_recent_*() functions:
39  * (Must be a power of two minus one!)
40  */
41 #define AP_TIME_RECENT_THRESHOLD 15
42 
43 /* Options for ap_recent_ctime_ex */
44 /* No extension */
45 #define AP_CTIME_OPTION_NONE 0x0
46 /* Add sub second timestamps with micro second resolution */
47 #define AP_CTIME_OPTION_USEC 0x1
48 /* Use more compact ISO 8601 format */
49 #define AP_CTIME_OPTION_COMPACT 0x2
50 /* Add timezone offset from GMT ([+-]hhmm) */
51 #define AP_CTIME_OPTION_GMTOFF 0x4
52 
53 
66  apr_time_t t);
67 
80  apr_time_t t);
81 
82 
91 
92 
104  int option, int *len);
105 
106 
113 
119 
120 #ifdef __cplusplus
121 }
122 #endif
123 
124 #endif /* !APACHE_UTIL_TIME_H */
APR Platform Definitions.
APR Time Library.
apr_status_t ap_explode_recent_localtime(apr_time_exp_t *tm, apr_time_t t)
apr_status_t ap_recent_ctime_ex(char *date_str, apr_time_t t, int option, int *len)
apr_status_t ap_recent_rfc822_date(char *date_str, apr_time_t t)
void ap_force_set_tz(apr_pool_t *p)
apr_status_t ap_recent_ctime(char *date_str, apr_time_t t)
apr_status_t ap_explode_recent_gmt(apr_time_exp_t *tm, apr_time_t t)
int apr_status_t
Definition: apr_errno.h:44
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
apr_int64_t apr_time_t
Definition: apr_time.h:45
HTTP Daemon routines.
#define AP_DECLARE(x)
Definition: macros.h:1
Definition: apr_time.h:97
apr_pool_t * p