Jump to content

[SOLVED] Date modifications and filter


Daguse

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

Archived

This topic is now archived and is closed to further replies.

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