1--TEST-- 2Test DateTime::setDate() function : basic functionality 3--FILE-- 4<?php 5 //Set the default time zone 6date_default_timezone_set("Europe/London"); 7 8echo "*** Testing DateTime::setDate() : basic functionality ***\n"; 9 10$datetime = new DateTime("2009-01-30 19:34:10"); 11 12echo $datetime->format(DATE_RFC2822) . "\n"; 13 14$datetime->setDate(2008, 02, 01); 15 16echo $datetime->format(DATE_RFC2822) . "\n"; 17 18?> 19--EXPECT-- 20*** Testing DateTime::setDate() : basic functionality *** 21Fri, 30 Jan 2009 19:34:10 +0000 22Fri, 01 Feb 2008 19:34:10 +0000 23