sangli1980 Posted September 26, 2009 Share Posted September 26, 2009 HI I need to sort this issue ASAP, can someone please help. We have a deal with expires at a certain time, due to daylight savings the clock has moved ahead by 1 hour but the deal still shows expiring at original time and not the server time. The code is below: $db->where[] = 'start_date = "'.date('Y-m-d', time() - 10 * 3600).'"'; //CHANGE $db->where[] = 'start_time = 0 OR start_time <= "'.date('H:i:s', time()).'"'; $db->where[] = 'end_time = 0 OR end_time >= "'.date('H:i:s', time()).'"'; //CHANGE $db->order = 'start_date, start_time DESC'; function DealTimeLeft ($date, $time = 0) { $message = 'Deal Closed'; if ($time == 0) { $endtime = strtotime($date) + 86400 + 36000; } else { $endtime = strtotime($date)+$time; } Quote Link to comment https://forums.phpfreaks.com/topic/175637-solved-expiry-time-with-daylight-savings/ Share on other sites More sharing options...
sangli1980 Posted September 27, 2009 Author Share Posted September 27, 2009 Sorted...... thanks anyways Quote Link to comment https://forums.phpfreaks.com/topic/175637-solved-expiry-time-with-daylight-savings/#findComment-925762 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.