On Tue, 2003-10-21 at 11:02, Steve Miller wrote: > Maybe it's just late, but I can't seem to figure out how to create a > timestamp from month, day, and year values received from a form. > > If I use mktime(0,0,0,$birth_month,$birth_day,$birth_year) where year values > are before 1970, I get -1 for a result (example: $birth_month=8, > $birth_day=16, $birth_year=1955 gives -1). I am simply trying to enter > birthdates into mysql, and am stumped. > > Anyone help me with this? > Many thanks, > steve
I think the issue may be with the dates you are using. AFAIK, mktime() uses the Unix Epoch of 1/1/1970 and therefore mktime(0,0,0,0,0,0) == 1/1/1970. I'm not sure how to get around this, as I've never encountered this problem myself, but I'll scout around a few sources and see what I can find... Matt -- +----------------------------------+ |Matthew Macdonald-Wallace | |The Truth Will Set you Free | |http://www.truthisfreedom.org.uk/ | +----------------------------------+ Burns: Oh, quit cogitating, Steinmetz, and use an open-faced club! A sand wedge! Homer: Mmm ... open-faced club sandwich. Scenes From the Class Struggle in Springfield ____ � The WDVL Discussion List from WDVL.COM � ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED] To set a personal password send an email to [EMAIL PROTECTED] with the words: "set WDVLTALK pw=yourpassword" in the body of the email. To change subscription settings to the wdvltalk digest version: http://wdvl.internet.com/WDVL/Forum/#sub ________________ http://www.wdvl.com _______________________ You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
