Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40727 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26983 invoked from network); 27 Sep 2008 07:40:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Sep 2008 07:40:56 -0000 Authentication-Results: pb1.pair.com header.from=indeyets@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=indeyets@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.14 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: indeyets@gmail.com X-Host-Fingerprint: 209.85.217.14 mail-gx0-f14.google.com Received: from [209.85.217.14] ([209.85.217.14:59768] helo=mail-gx0-f14.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 81/61-63390-683EDD84 for ; Sat, 27 Sep 2008 03:40:55 -0400 Received: by gxk7 with SMTP id 7so8894435gxk.23 for ; Sat, 27 Sep 2008 00:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=c0RVgyZ3TRhn4XO1dkFVjOMCoM6lsv3iHx+QPipXiWc=; b=hT2knSzGHJhlf0e6j4xYCZJWtbFAT8k3aSJfW9xwioVfqMeavUNNuOvEOSvivZbwb4 k7rFk4lRaQzWqFjoV/XxQXjsUE/LnZejp1FLQUI7tO2o0Yz/lvD5V0GSfDaANHQxArB2 SdvcnqP1yBnJXPXhwANK+0/ND/rHi+2xfcc1g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=s4yCPDJYu9ETCSij/tZblAqkqB6C7gBkGsY5rL03VXqtz/fUvVvDwlNOhzav0RvtZZ Y+z8MypepgwjbRAcZj+7ygHi8MhE8VB9uMncBFMQKfkHLLROhLjrmLCyWBoV4Svh8ut3 wLi6muf4/6tmCveye8L6M0GyUIhBw9oZnretQ= Received: by 10.150.134.21 with SMTP id h21mr3483320ybd.181.1222501252159; Sat, 27 Sep 2008 00:40:52 -0700 (PDT) Received: by 10.150.186.11 with HTTP; Sat, 27 Sep 2008 00:40:52 -0700 (PDT) Message-ID: Date: Sat, 27 Sep 2008 11:40:52 +0400 To: "Ilia Cheishvili" Cc: "PHP internals" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Subject: Re: [PHP-DEV] [PATCH] Fix date() bug From: indeyets@gmail.com ("Alexey Zakhlestin") On Sat, Sep 27, 2008 at 11:04 AM, Ilia Cheishvili wrote: > Hi all, > This patch addresses the issue with the date() function. When passing in a > 'u', the date() function simply outputs six zeros. To fix this, I added a > gettimeofday() call that figures out what to display for microseconds. I am > including the headers and using the function with pre-processor safeguards > as well. > Take a look :) Wouldn't it be better, to make gettimeofday() call only in case of 'u'? -- Alexey Zakhlestin http://blog.milkfarmsoft.com/