Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 4051 invoked by uid 6000); 3 Jan 2000 18:18:44 -0000 Received: (qmail 4038 invoked from network); 3 Jan 2000 18:18:43 -0000 Received: from ss06.nc.us.ibm.com (HELO 32.97.136.236) (32.97.136.236) by taz.hyperreal.org with SMTP; 3 Jan 2000 18:18:43 -0000 Received: from johngalt (unverified [9.37.75.6]) by johngalt.raleigh.ibm.com (EMWAC SMTPRS 0.83) with SMTP id ; Mon, 03 Jan 2000 13:19:03 -0500 Message-ID: <005701bf5617$03680b10$064b2509@raleigh.ibm.com> From: "Bill Stoddard" To: Subject: ap_current_time() is not intuitive Date: Mon, 3 Jan 2000 13:19:02 -0500 Organization: IBM Corp. MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org Status: O Can we collapse the ap_current_time() function into either ap_make_time or ap_get_curtime()? Here is how you use APR to get the current time today: ap_make_time(&time, p); ap_current_time(time); ap_get_curtime(time, &thetime); ap_make_time creates the ap_time_t structure. Then ap_current_time() makes the underlying system call to initialize the ap_time_t structure. Then ap_get_curtime returns the time in seconds since 1/1/1970. Note that ap_get_curtime is not getting the current time, it is getting the time from when ap_current_time was called. This is non-intutitive as hell. ________________________________________________ Bill Stoddard stoddard@raleigh.ibm.com Come to the first official Apache Software Foundation Conference!