Registered: Mar 2003
Location: The Netherlands
Distribution: Red Hat 7.3, Red Hat 9, Solaris8, Slackware 10, Slax on USB, AIX, FreeBSD, WinXP, AIX, Ubuntu
php and mySQL dates before a sudden year go wrong???
I use php and mySQL for my website. I just found out that sometimes a date goes weeeeeeee....
I have a "birthday"field in my table, which i retrieve from my php script, and put it in a var, let say $BIRTHDAY.
Since the format of mySQL dates are not what I like, I change the format to another like this:
$formatted = strftime("%d %B",strtotime($BIRTHDAY));
As you see, I only want the day and month. This seemed to work fine, until i found that one date does't show up... It was a birthday from someone born in 1966 ... When i changed it to i.e. 1980 it worked fine.
Is this some kind of "bug"in the function strtotime() or strftime(), or even mySQL? However, in the database, i see the date is correct... (Years before the year 19XX are not recognized?)
Last edited by Satriani; 04-29-2003 at 03:33 AM.