Magnat
Guest
Ошибка:Windows does not support dates prior...
The Error message that is displayed is: -
Warning: date(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in h
rojecthtdocsnewsecondhandbooks4umoredetails.php
Кто нибудь помогите.. Плиз.... Срочно нужно
PHP:
$auctionend and $auctionstart are pulled out from the database (you dont need to worry about these values They simply are timestamps of a certain date and time).
Once timespan is calculated the error message is displayed if it is under a day (less than 24hrs)
$today = time();
$Timespan = $AuctionEnd - $today;
echo " AuctionStart : ", date("l dS of F Y H:i A", $AuctionStart);
echo " AuctionEnd : ", date("l dS of F Y H:i A", $AuctionEnd);
f($Timespan < 1){
echo " Auction Status : Sorry this auction has ended ";
}
else
{
//today is added by 1 to give the amount of days left because of timing it needs to be done.
//note the timespan isnt saved. a day is added to show user timeleft.
$formattoday = mktime(date("H"), date("i"), 0, date("m") , date("d")+1, date("Y"));
$formatTimespan = $AuctionEnd - $formattoday;
$Days = date("d", $formatTimespan);
if($Days > 1)
{
echo " Auction Status : Active ";
echo " Time Left : ", date("d", $formatTimespan);
echo "d ";
echo date("H", $formatTimespan);
echo "h ";
echo date("i", $formatTimespan);
echo "m ";
}
else
{
$formattoday = mktime(date("H"), date("i"), 0, date("m") , date("d"), date("Y"));
$NewTimespan = $AuctionEnd - $formattoday;
echo " Auction Status : Active ";
echo " Time Left : ", date("H", $NewTimespan);
echo "h ";
echo date("i", $NewTimespan);
echo "m ";
}
Warning: date(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in h
![Stick Out Tongue :p :p](/talk/styles/default/xenforo/smilies/tongue.png)
Кто нибудь помогите.. Плиз.... Срочно нужно