1--TEST--
2Test date_time_set() function : basic functionality
3--FILE--
4<?php
5 //Set the default time zone
6date_default_timezone_set("Europe/London");
7
8echo "*** Testing date_time_set() : basic functionality ***\n";
9
10// Create a DateTime object
11$datetime = date_create("2009-01-31 15:14:10");
12
13echo "Initial date: " . date_format($datetime, DATE_RFC2822) . "\n";
14
15date_time_set($datetime, 17, 20);
16echo "After modification1 " . date_format($datetime, DATE_RFC2822) . "\n";
17
18date_time_set($datetime, 19, 05, 59);
19echo "After modification2 " . date_format($datetime, DATE_RFC2822) . "\n";
20
21date_time_set($datetime, 24, 10);
22echo "After modification3 " . date_format($datetime, DATE_RFC2822) . "\n";
23
24date_time_set($datetime, 47, 35, 47);
25echo "After modification4 " . date_format($datetime, DATE_RFC2822) . "\n";
26
27date_time_set($datetime, 54, 25);
28echo "After modification5 " . date_format($datetime, DATE_RFC2822) . "\n";
29
30?>
31--EXPECT--
32*** Testing date_time_set() : basic functionality ***
33Initial date: Sat, 31 Jan 2009 15:14:10 +0000
34After modification1 Sat, 31 Jan 2009 17:20:00 +0000
35After modification2 Sat, 31 Jan 2009 19:05:59 +0000
36After modification3 Sun, 01 Feb 2009 00:10:00 +0000
37After modification4 Mon, 02 Feb 2009 23:35:47 +0000
38After modification5 Wed, 04 Feb 2009 06:25:00 +0000
39