Jump to content

[SOLVED] mktime() expects parameter 6 to be long


zc1

Recommended Posts

 

Hi,

 

I have found a script on the net which I am trying to fix up, and it nearly done, but for a few things and the below 3 errors I am getting in the same file. I was wondering if some one could help. I have looked at mktime on php.net and could really see anything like the below code.

 

Warning: mktime() expects parameter 6 to be long, string given in /home/USERNAME/public_html/calendar/event.php on line 51

 

Warning: mktime() expects parameter 6 to be long, string given in /home/USERNAME/public_html/calendar/event.php on line 56

 

Warning: mktime() expects parameter 6 to be long, string given in /home/USERNAME/public_html/calendar/event.php on line 61

 

I have put the line numbers in the below code

50	$split = explode("-",$Date);
51	$showDate = date("l F jS, Y", mktime(0,0,0,$split[1],$split[2],$split[0]));
52
53		// format the displayed time
54		if ($CeSS == 1) {
55		$split2 = explode(":",$CeST);
56		$showStart = date("g:i A", mktime($split2[0],$split2[1],0,$split[1],$split[2],$split[0]));
57		}
58			
59		if ($CeSh == 1) {
60		$split2 = explode(":",$CeSt);
61		$showEnd = date("g:i A", mktime($split2[0],$split2[1],0,$split[1],$split[2],$split[0]));
62		}
63				
64		if ($showStart) {
65		$showTime = $showStart;
66			if ($showEnd) {
67			$showTime .= " - $showEnd";
68			}
69		}

 

Regards,

Garry

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.