View Full Version : Windows and gmdate()

10-11-2004, 02:14 AM
The folloing code:

<?php echo gmdate("g:i a j M Y",SI_getFirstHit()+(((gmdate('I'))?($tz_offset+1):$tz_offset)*3600)); ?>

generates the following error on an IIS server:

Warning: gmdate(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970

Does anybody know how I could modify that to get around this, and also why this error occurs?

10-11-2004, 04:01 AM
what is the value of ..

echo SI_getFirstHit()+(((gmdate('I'))?($tz_offset+1):$tz_offset)*3600);

? can only assume that this valus is not a valid timestamp on windows e.g. < 0

10-12-2004, 01:35 AM

Turns out I missed the "on switch" of the program I was trying to run, so that the query it should have made to create the date value to grab never happened. Hence the invalid value.

I am smrt.