NYCPHP Meetup

NYPHP.org

[nycphp-talk] NYPHP Holiday Party RSVP Deadline

Jeff Siegel jsiegel1 at optonline.net
Tue Dec 9 06:31:54 EST 2003


The RSVP *deadline* for the NYPHP party is Sunday, Dec. 14th. If you 
haven't yet RSVP'ed, please do so now. Details are below.

Jeff Siegel
==================================

Join New York PHP for some Holiday cheer!

The NYPHP Holiday Party will be on December 16th at 6:30pm at the Hard 
Rock Cafe, 221 West 57th Street, New York. The cost is $20.00 per person 
to be paid at the door which includes selection from the menu below.

You must contact us in advance if you'll be attending.
RSVP to party at nyphp.org

All are welcome!


When: December 16th at 6:30pm

Where: Hard Rock Cafe, 221 West 57th Street, New York

The Party Menu

Choice of Entrees:
HRC Country Char-Broiled Burger with Cheese and/or Bacon HRC Natural 
Veggie Burger
Grilled Chicken Breast Sandwich
HRC Caesar Salad
Pig Sandwich

Dessert:
Homestyle Chocolate Cake

Choice of Beverage:
Coffee, Tea or Soft Drink




>From hans not junk at nyphp.com  Tue Dec  9 10:53:38 2003
Return-Path: <hans not junk at nyphp.com>
Received: from londo.swishmail.com (londo.swishmail.com [209.10.110.95])
	by virtu.nyphp.org (Postfix) with ESMTP id 90A7FA85E6
	for <talk at lists.nyphp.org>; Tue,  9 Dec 2003 10:53:38 -0500 (EST)
Received: (qmail 32928 invoked by uid 89); 9 Dec 2003 15:53:38 -0000
Received: from unknown (HELO nyphp.com) (hans not junk at nyphp.com@128.122.155.151)
	by londo.swishmail.com with AES256-SHA encrypted SMTP;
	9 Dec 2003 15:53:38 -0000
Message-ID: <3FD5F03F.6010402 at nyphp.com>
Date: Tue, 09 Dec 2003 10:54:39 -0500
From: Hans Zaunere <hans not junk at nyphp.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
	rv:1.5) Gecko/20031007
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: NYPHP Talk <talk at lists.nyphp.org>
Subject: Re: [nycphp-talk] Date problems running PHP on IRIX
References: <E1ATU6P-0000tW-00 at gull.mail.pas.earthlink.net>
In-Reply-To: <E1ATU6P-0000tW-00 at gull.mail.pas.earthlink.net>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: talk at lists.nyphp.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: NYPHP Talk <talk at lists.nyphp.org>
List-Id: NYPHP Talk  <talk.lists.nyphp.org>
List-Unsubscribe: <http://lists.nyphp.org/mailman/listinfo/talk>,
	<mailto:talk-request at lists.nyphp.org?subject=unsubscribe>
List-Archive: <http://lists.nyphp.org/pipermail/talk>
List-Post: <mailto:talk at lists.nyphp.org>
List-Help: <mailto:talk-request at lists.nyphp.org?subject=help>
List-Subscribe: <http://lists.nyphp.org/mailman/listinfo/talk>,
	<mailto:talk-request at lists.nyphp.org?subject=subscribe>
X-List-Received-Date: Tue, 09 Dec 2003 15:53:38 -0000



Daniel Porcher wrote:

> I thought the 1969 date limitiation was just a Windows issue, but I have

No no.. it stems from the UNIX timestamp being a signed 32bit int - I think Windows just copied that.

> just run into the same problem on a client's web site hosted by Rapidsite.
> Rapidsite is hosting a PHP CGI implementation on Apache on IRIX on a SGI
> server.

That's a nice combination  :)

> Here's the test code:
> 
> echo formatdate("1970-01-30");
> echo "<br>";
> echo formatdate("1969-01-30");
> echo "<br>";
> echo formatdate("1959-01-30");
> echo "<br>";
> 
> 
> function formatdate($szdate)
> {
> 	if  (isset($szdate) && ($szdate != "0000-00-00"))
> 	{
> 		$date = strtotime($szdate);
> 		$arrdate = getdate($date);
> 		$rtn = checkdate($arrdate['mon'], $arrdate['mday'] ,
> $arrdate['year']);
> 		if($rtn)
> 		{
> 			return ($arrdate['mon'] . "/" . $arrdate['mday'] .
> "/" . $arrdate['year']);
> 		}else{
> 			return $szdate;
> 		}
> 	}
> 	return "";
> 	
> }
> 
> The results I get on Rapidsite is:
> 
> 1/30/1970
> 12/31/1969
> 12/31/1969

Basically, some of the functions you use in formatdate() are using the UNIX timestamp behind the scenes.  For the most part, these can't handle anything before the Epoch (something like the last second in 1969 - a good year).  

> I ran the same code on another host and got the correct results
> 
> 1/30/1970
> 1/30/1969
> 1/30/1959

Obviously, this is platform dependant.  Out of curiosity, what os/architecture was able to handle this (it means the time operations can use a negative number - most cannot).

Basically, it's summed up in the Note at http://us2.php.net/strtotime

> Has anybody seen this problem before?  Is there a work around?

The only workaround is to use a "real" date format (like a date format in MySQL/Oracle) or implement some of your own time/date manipulation functions - this begins to be painfull very quickly, so I's recommended a different time/date storage format :)

H



>From hans not junk at nyphp.com  Tue Dec  9 10:55:21 2003
Return-Path: <hans not junk at nyphp.com>
Received: from londo.swishmail.com (londo.swishmail.com [209.10.110.95])
	by virtu.nyphp.org (Postfix) with ESMTP id 1E2E5A85E6
	for <talk at lists.nyphp.org>; Tue,  9 Dec 2003 10:55:21 -0500 (EST)
Received: (qmail 33453 invoked by uid 89); 9 Dec 2003 15:55:21 -0000
Received: from unknown (HELO nyphp.com) (hans not junk at nyphp.com@128.122.155.151)
	by londo.swishmail.com with AES256-SHA encrypted SMTP;
	9 Dec 2003 15:55:21 -0000
Message-ID: <3FD5F0A6.2020000 at nyphp.com>
Date: Tue, 09 Dec 2003 10:56:22 -0500
From: Hans Zaunere <hans not junk at nyphp.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
	rv:1.5) Gecko/20031007
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: NYPHP Talk <talk at lists.nyphp.org>
Subject: Re: [nycphp-talk] Connection to MySQL 4.1.X with php 5.0b2 running
	windows xp
References: <000201c3bda1$56fa1480$bf8d3818 at oberon1>
	<3FD4D9EA.20707 at nyphp.com> <20031208201351.GB7170 at panix.com>
In-Reply-To: <20031208201351.GB7170 at panix.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: talk at lists.nyphp.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: NYPHP Talk <talk at lists.nyphp.org>
List-Id: NYPHP Talk  <talk.lists.nyphp.org>
List-Unsubscribe: <http://lists.nyphp.org/mailman/listinfo/talk>,
	<mailto:talk-request at lists.nyphp.org?subject=unsubscribe>
List-Archive: <http://lists.nyphp.org/pipermail/talk>
List-Post: <mailto:talk at lists.nyphp.org>
List-Help: <mailto:talk-request at lists.nyphp.org?subject=help>
List-Subscribe: <http://lists.nyphp.org/mailman/listinfo/talk>,
	<mailto:talk-request at lists.nyphp.org?subject=subscribe>
X-List-Received-Date: Tue, 09 Dec 2003 15:55:21 -0000



Daniel Convissor wrote:

> Folks:
> 
> On Mon, Dec 08, 2003 at 03:07:06PM -0500, Hans Zaunere wrote:
> 
>>I'm not too familiar with the Windows precompiled binaries (although I've 
>>had PHP4 and MySQL humming along under WinXP) but if you're using a PHP 5 
>>beta, why is it php4ts.dll?  Might be something to check out
> 
> 
> Very observant Hans.  Those names are correct for now.

Eek.

> This DLL naming matter has been brought up to the developers, but there 
> has been no indication as to whether or not this will change.

Eek again - it has to.  Calling a file php4 when it's php5 is just - well - insane.

> I hope it does get modified because it would make it possible to easily
> run PHP 4 and PHP 5 on the same machine.

And for sanity and common sense reasons :)

H





More information about the talk mailing list