Vermillion Posted July 17, 2010 Share Posted July 17, 2010 Hi guys, I decided to write to my own DateTime class mainly because the one PHP comes with doesn't do anything I want it to do. I need to implement a way of using DST for countries that use it, but I myself live in a place where DST is never used, so it's hard for me, so I have a few questions, first some questions related to DST itself and then the ones in PHP so I can implement it. * When does the DST enter in effect? * When does it end? * Is it the same for every year? * Do all the countries that use DST move their clocks one hour ahead or the time that needs to be changed varies from place to place? * How exactly can I get "The second Sunday of every march" with PHP? Link to comment https://forums.phpfreaks.com/topic/208055-implementing-dst-for-countries-that-use-it/ Share on other sites More sharing options...
Mchl Posted July 17, 2010 Share Posted July 17, 2010 http://en.wikipedia.org/wiki/Daylight_saving_time $a = new DateTime('second sunday of march 2007'); echo $a->format('Y-m-d'); Also take a look at: http://www.php.net/manual/en/datetimezone.listabbreviations.php Link to comment https://forums.phpfreaks.com/topic/208055-implementing-dst-for-countries-that-use-it/#findComment-1087574 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.