1--TEST--
2Test date_date_set() function : basic functionality
3--FILE--
4<?php
5/* Prototype  : DateTime date_date_set  ( DateTime $object  , int $year  , int $month  , int $day  )
6 * Description: Resets the current date of the DateTime object to a different date.
7 * Source code: ext/date/php_date.c
8 * Alias to functions: DateTime::setDate
9 */
10
11 //Set the default time zone
12date_default_timezone_set("Europe/London");
13
14echo "*** Testing date_date_set() : basic functionality ***\n";
15
16$datetime = date_create("2009-01-30 19:34:10");
17
18echo date_format($datetime, DATE_RFC2822) . "\n";
19
20date_date_set($datetime, 2008, 02, 01);
21
22echo date_format($datetime, DATE_RFC2822) . "\n";
23
24?>
25===DONE===
26--EXPECTF--
27*** Testing date_date_set() : basic functionality ***
28Fri, 30 Jan 2009 19:34:10 +0000
29Fri, 01 Feb 2008 19:34:10 +0000
30===DONE===
31