Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 63617 invoked by uid 500); 4 Jan 2002 20:24:03 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 63606 invoked from network); 4 Jan 2002 20:24:03 -0000 Date: Fri, 4 Jan 2002 12:24:11 -0800 From: Jon Travis To: dev@apr.apache.org Subject: Time funniness between HPUX and everyone else Message-ID: <20020104122411.A17981@covalent.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I've been experiencing some time funniness on HPUX with respect to the calculation of the GMT offset. Here are the results under HPUX: apr_explode_localtime(&xt, 0); xt.tm_gmtoff = -28800 xt.tm_isdst = 0 apr_explode_localtime(&xt, 967681226000000); xt.tm_gmtoff = -28800 xt.tm_isdst = 1 Under my Linux box: apr_explode_localtime(&xt, 0); xt.tm_gmtoff = -28800 xt.tm_isdst = 0 apr_explode_localtime(&xt, 967681226000000); xt.tm_gmtoff = -25200 xt.tm_isdst = 1 I believe the problem lies with the fact that we attempt to calculate 'server_gmt_offset' in the apr_unix_setup_time() function, but the gmt offset my change when requesting times in a dst different than the current one. For instance, the current time is used to formulate server_gmt_offset, and we are not in DST here in US/Pacific. Under Linux, we get the gmtoffset for free with our localtime call. I thought it might be that my HPUX box was just wacked out of its gourd wrt the timezone setup, but it looks correct after investigation. Perhaps the correct thing to do is determine the gmt offset during dst and also when we are not in it, and use different ones in get_offset() after checking dst (similar to the netware code.) -- Jon