Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14773 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79043 invoked by uid 1010); 9 Feb 2005 20:50:17 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 79028 invoked from network); 9 Feb 2005 20:50:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Feb 2005 20:50:16 -0000 X-Host-Fingerprint: 194.109.193.120 unknown Linux 2.4/2.6 Received: from ([194.109.193.120:53153] helo=mx1.moulin.nl) by pb1.pair.com (ecelerity HEAD (r4105:4106)) with SMTP id 1C/19-30278-8877A024 for ; Wed, 09 Feb 2005 15:50:16 -0500 Received: from localhost (localhost [127.0.0.1]) by mx1.moulin.nl (Postfix) with ESMTP id 93EFB69FA; Wed, 9 Feb 2005 21:50:19 +0100 (CET) Received: from mx1.moulin.nl ([127.0.0.1]) by localhost (moulin [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 32750-06; Wed, 9 Feb 2005 21:50:16 +0100 (CET) Received: from [127.0.0.1] (localhost [127.0.0.1]) by mx1.moulin.nl (Postfix) with ESMTP id A711421AAC; Wed, 9 Feb 2005 21:50:16 +0100 (CET) Message-ID: <420A7781.50504@iamjochem.com> Date: Wed, 09 Feb 2005 21:50:09 +0100 User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lukas Smith Cc: internals@lists.php.net References: <20050209203810.59785.qmail@lists.php.net> In-Reply-To: <20050209203810.59785.qmail@lists.php.net> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at moulin.nl Subject: Re: [PHP-DEV] timeoffset per process From: jochem@iamjochem.com (Jochem Maas) Lukas Smith wrote: > Hi, > > I am currently writing test cases for time sensitive code. Meaning this > code behaves different depending on the time of day. Obviously one > solution is to mess with the server time, but that is going to screw up > anything else going on the server. > > The only solution that I have currently come up with requires alot of > uglyness by making my code call a wrapper function instead of time() or > date() which optionally adds an offset to the time that can be set > before executing the tests. > > It seems like a minor feature to add to the date extension. But then > again I can understand that Derick doesnt feel features for testing fits > into the new date extension. Am I missing an obvious alternative? Is > there a better place to add this feature? maybe install a test setup on your local machine? then you can mess with the local time, no problems? rgds, Jochem > > regards, > Lukas >