Jump to content

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/119579-solved-date-modifications-and-filter/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.