From: [EMAIL PROTECTED] Operating system: MacOS X (Darwin 1.2) PHP version: 4.0.4pl1 PHP Bug Type: Date/time related Bug description: mktime using mday<=0 On PHP documantation: mktime(hour,min,sec, year,0,mon) refers the last day of month 'mon-1'. On MacOS X this failed, there it refers the first day of month 'mon' and mktime(hour,min,sec, year,-1,mon) refers the last day of month 'mon-1'. See the test: [aragorn:~/Downloads] dieter% cat A.c #include <stdio.h> #include <time.h> main() { struct tm mytm; int i; mytm.tm_sec = 0; mytm.tm_min = 0; mytm.tm_hour = 0; mytm.tm_year = 101; mytm.tm_wday = 0; mytm.tm_yday = 0; mytm.tm_isdst = 0; mytm.tm_gmtoff = 0; mytm.tm_zone = 0; for (i = 2; i >= -2; i--) { mytm.tm_mday = i; mytm.tm_mon = 2; printf ("%02d.%02d ", mytm.tm_mday, mytm.tm_mon+1); printf (" --> %ld", mktime(&mytm)); printf (" --> %02d.%02d\n", mytm.tm_mday, mytm.tm_mon+1); } } [aragorn:~/Downloads] dieter% cc -o A A.c [aragorn:~/Downloads] dieter% ./A 02.03 --> 983487600 --> 02.03 01.03 --> 983401200 --> 01.03 00.03 --> 983401200 --> 01.03 -1.03 --> 983314800 --> 28.02 -2.03 --> 983228400 --> 27.02 [aragorn:~/Downloads] dieter% -- Edit Bug report at: http://bugs.php.net/?id=8828&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]