]> granicus.if.org Git - php/commitdiff
Fix the get_request_time implementation for the 2.0 SAPIs to return
authorJoe Orton <jorton@php.net>
Sat, 23 Oct 2004 12:56:20 +0000 (12:56 +0000)
committerJoe Orton <jorton@php.net>
Sat, 23 Oct 2004 12:56:20 +0000 (12:56 +0000)
seconds not microseconds and to use TSRM stuff correctly.

sapi/apache2filter/sapi_apache2.c
sapi/apache2handler/sapi_apache2.c

index 99f8aa78533f35bf1e78700777470f18e7a409bd..ffc8dfbd5bc3baad1c4709f099fad9f3b6a13d3c 100644 (file)
@@ -299,13 +299,10 @@ php_apache_disable_caching(ap_filter_t *f)
        return OK;
 }
 
-static time_t
-php_apache_sapi_get_request_time(void)
+static time_t php_apache_sapi_get_request_time(TSRMLS_D)
 {
-       TSRMLS_FETCH();
        php_struct *ctx = SG(server_context);
-
-       return ctx->r->request_time;
+       return apr_time_sec(ctx->r->request_time);
 }
 
 extern zend_module_entry php_apache_module;
index 66583b3edf9c81adb837a36804a6de841a68f4e1..354ab96716d06305b884b0d4842dff936d8cf8b0 100644 (file)
@@ -277,13 +277,9 @@ static void php_apache_sapi_log_message_ex(char *msg, request_rec *r)
        }
 }
 
-static time_t php_apache_sapi_get_request_time(void) {
-       php_struct *ctx;
-       TSRMLS_FETCH();
-       
-       ctx = SG(server_context);
-
-       return ctx->r->request_time;
+static time_t php_apache_sapi_get_request_time(TSRMLS_D) {
+       php_struct *ctx = SG(server_context);
+       return apr_time_sec(ctx->r->request_time);
 }
 
 extern zend_module_entry php_apache_module;