Possible Duplicate:
strtotime date weird result
I am trying to compare two times for an attendance system, i am trying to get the accurate time for Arkansas,USA but im not being to able to get the correct time. Please, guide me in the right direction if i am doing something wrong, part of my code:
$curTime =DATE("H:i A", strtotime('GMT-6'));
foreach($res as $r)
{
$crs_id =$r['course_id'];
$query1 = "select * from tbl_course_time where course_id='$crs_id'";
$res1 = $obj->querySelect($query1);
$start_time = DATE("H:i", STRTOTIME($res1[0]['start_time']));
$end_time = DATE("H:i", STRTOTIME($res1[0]['end_time']));
if ($curTime > $start_time && $curTime < $end_time)
{
$qry="insert into tbl_attendance set stud_id='$id',attd_date='$curDateForDB',attd_time='$curTimeForDB',course_id='$attd_courseId'";
$res=$obj->queryInsert($qry);
$result1 = "taken";
}
}
It's giving me incorrect time's is it the GMT time im getting wrong or something else Any help would be greatly appreciated, Thank you