Daguse Posted August 13, 2008 Share Posted August 13, 2008 So where did all the little code snippets go? They use to have them all over the site. Ok down to the question at hand. I am trying to make it so my system knows if its daylight savings or not. Now what I was thinking was if I can filter the month and then use a if statement to determine if the month is in daylight savings and then use that to select the negative form zulu. The question is how to filter the month and find out what month it is from the date() or time() code. Code below! $timezone=-5; $time=time(); $gmttime= gmdate("M d Y H:i:s", $time); $sqldate=date("Y-m-d H:i:s",strtotime("$timezone hours",strtotime($gmttime))); I know its easer then I am making but thanks for the help! Quote Link to comment https://forums.phpfreaks.com/topic/119579-solved-date-modifications-and-filter/ Share on other sites More sharing options...
unkwntech Posted August 13, 2008 Share Posted August 13, 2008 date('I'); // capital i will return 1 if Daylight Saving Time, 0 otherwise. Quote Link to comment https://forums.phpfreaks.com/topic/119579-solved-date-modifications-and-filter/#findComment-616081 Share on other sites More sharing options...
Daguse Posted August 14, 2008 Author Share Posted August 14, 2008 just what I was looking for thanks! Quote Link to comment https://forums.phpfreaks.com/topic/119579-solved-date-modifications-and-filter/#findComment-616128 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.