- some housekeeping
[m6w6/ext-http] / http_api.c
index 3f4b7a66072b9af63905daee897931fffcc86b49..3969b82fd156d50ca69037893b199964713adbf7 100644 (file)
 
 /* $Id$ */
 
-#ifdef HAVE_CONFIG_H
-#      include "config.h"
-#endif
-
+#define HTTP_WANT_SAPI
 #include "php_http.h"
 
-#include "SAPI.h"
 #include "php_output.h"
 #include "ext/standard/url.h"
 
@@ -208,7 +204,7 @@ void _http_log_ex(char *file, const char *ident, const char *message TSRMLS_DC)
        struct tm nowtm;
        char datetime[20] = {0};
        
-       time(&now);
+       now = HTTP_GET_REQUEST_TIME();
        strftime(datetime, sizeof(datetime), "%Y-%m-%d %H:%M:%S", php_localtime_r(&now, &nowtm));
 
 #define HTTP_LOG_WRITE(file, type, msg) \