View Full Version : Get start of DST

01-24-2008, 06:57 AM

What I'm trying to do seems pretty simple. I want to get the date/time that daylight savings time begins in the selected timezone (set through date_ timezone_ set). I know that date('I') returns whether or not DST is currently being observed for the given time, but I need a way to find when it starts instead of if it is currently being observed.

Any ideas?

Thanks in advance.


01-24-2008, 07:35 AM
I figured out the solution.

You want to use this function: http://us.php.net/manual/en/function.timezone-transitions-get.php

It's a little hard to understand at first, but it just returns an array, each element containing information on a transition for that time zone.

Hope this helps someone!