Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14772 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59833 invoked by uid 1010); 9 Feb 2005 20:38:11 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 59818 invoked by uid 1007); 9 Feb 2005 20:38:11 -0000 Message-ID: <20050209203810.59785.qmail@lists.php.net> To: internals@lists.php.net Date: Wed, 09 Feb 2005 21:38:10 +0100 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 82.140.16.151 Subject: timeoffset per process From: lsmith@php.net (Lukas Smith) 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? regards, Lukas