Hi all,
I need your help with my PHP, I have got the date and time format especially the year, month, day date, hours, minutes and seconds. I have got a little problem with the day date.
Most of the day date are correct, but some of them are not correct.
Example: 20140407230000, 20140408233000, 20140408000000, 20140408003000.
If you can take a look an the 20140408230000, you will see that 2014 is the year, 04 is the month, 08 is the day date, 23 is the hours, 00 is the minutes and seconds.
From what I have got, the day date are wrong. I have the 08 day date when I'm on the 23 hours at the same day which is correct, but when I have the 00 hours I should have the day date 09 instead of 08.
Here is the code:
<?php
ini_set('max_execution_time', 300);
$errmsg_arr = array();
$errflag = false;
$link;
include ('simple_html_dom.php');
$html = file_get_html("http://www.mysite.com/get-listing.php?channels=" . $channel . "&id=" . $my_id);
$time1 = $html_two->find('span[id=time1]',0)->plaintext;
$time1i = strtotime($time1);
$title1 = $html_two->find('span[id=title1]',0)->plaintext;
$hours = $hoursMinutes[0];
$minutes = $hoursMinutes[1];
$program_list[$count]['start_time1'] = date('YmdHis',$time1i);
$xml .= "
<channel id='" . $my_id. " " . $channel . "'>";
$xml .= "
<display-name>" . $my_id. " " . $channel;
$xml .= "</display-name>";
$xml .= "
<programme channel='" . $my_id. " " . $channel . "' start='" . $program_list[$i]['start_time1'] . "' stop='" . $program_list[$i]['end_time1'] . "'>";
$xml .= "
</programme>";
$xml .= "
</channels>";
echo $xml;
?>
Can you please tell me how I can change the day date to the next day date when I am on the 00 hours using with my code?
Thanks in advance.