Web Hosting Talk







View Full Version : Simple question about date daylight savings


lexington
09-26-2008, 09:41 AM
Oddly I cannot find much info about this even though this pretty much affects every single person who works with user dates. Anyway, I read where using:

date("I");

So does this check the month of my server and if it falls within the daylight savings time it automatically outputs 1 or 0 based on the current date? So when we have to set the clocks back this function will display 0? I think that this is the case just making sure. Thanks.

zoticaic
09-26-2008, 11:33 AM
Although I have not worked too much with DST, PHPs DST calculation will depend on you system timezone (or any runtime value you provide). If this is the case when you set the clock back out of the DST timeframe, yes this will display 0.

HTH