Re: Calculating daylight savings time
| From: | Lisi | Date: | Tue, 19 Aug 2003 09:37:48 +0000 |
| Subject: | Re: Calculating daylight savings time | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-29952@lists.php.net to get a copy of this message | ||
What I need to do is figure this out for more than one location at a time. I am displaying Sabbath times for several different cities around the world at once (New York, London, Paris, Jerusalem, Sydney) - i.e. a certain amount of time before sunset, different for each city and each city is in a different dst zone.
Can I do something using setlocale, to change timezones to the city I need, and then use date(I)? Or does date(I) always work only for the US? And what exactly does setlocale change? I couldn't figure out from the notes on php.net.
Thanks for your help,
-Lisi
At 12:06 AM 8/17/03 -0700, Micah Stevens wrote:
As an afterthought, the docs are inspecific on who's daylight savings schedule that the function returns. There's another user submitted function in the comments list that takes into account a specific schedule. -Micah On Sunday 17 August 2003 12:43 am, Lisi wrote: I have sunset times stored in a database and the a PHP page that performs a number of calculations on the retrieved time. One of the things I need to figure out is whether or not to add an hour for Daylight Savings Time. Since there is more than once location, and each one begins and ends DST at a different time, I need to figure this out based on location. My question is, how do I figure out whether it's the "first sunday in April" yet or not? I know it has to do with the date() function somehow, I'm just not sure how to use it properly in this case - any suggestions? Thanks, -Lisi