Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news1.tnib.de!feed.news.tnib.de!news.tnib.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Chris Riesbeck Newsgroups: comp.lang.php Subject: Re: php DB rotation Date: Tue, 31 Jan 2012 13:00:53 -0600 Lines: 22 Message-ID: <9oqs35FeibU2@mid.individual.net> References: <4f27b317$0$5046$a8266bb1@newsreader.readnews.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net Rg6MUcB74SaefMv7H3UTpwxkyPVe1PTVpN4S6G+uL2rczdGfsm Cancel-Lock: sha1:+GPE+QKF4HtUjeUn1z+6V8GcQJc= User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 In-Reply-To: <4f27b317$0$5046$a8266bb1@newsreader.readnews.com> Xref: x330-a1.tempe.blueboxinc.net comp.lang.php:4699 On 1/31/2012 3:23 AM, Denis McMahon wrote: > On Mon, 30 Jan 2012 18:05:56 -0800, Jim Lee wrote: > >> the first way check timestamp have a drawback when server's time is not >> set to correct time ... > >> the second way is a better solution, but request additional setup - cron >> job > > A cron job running from the server clock will not be any more accurate > than using the server's time in PHP or in the database itself. > > If the server clock is wrong, the cron job will update the text file at > the wrong time anyway. As both methods rely on the server clock being > correct, I'd go with checking the time when you write to the table. > > You don't have to wait until the day you're going to start populating it > to create the table either. Having just read this same poster ask the same question on comp.lang.java.programmer, but claiming it was for a Java controller, I'm guessing troll.