We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 444aba4 commit 9fbc798Copy full SHA for 9fbc798
ext/date/tests/bug46268.phpt
@@ -0,0 +1,23 @@
1
+--TEST--
2
+Bug #46268 (When call DateTime#setTime, it seems to be called the last modify method too)
3
+--FILE--
4
+<?php
5
+date_default_timezone_set('Asia/Tokyo');
6
+
7
+$now = new DateTime('2008-10-10 01:02:03');
8
+echo $now->format("Y-m-d H:i:s") . PHP_EOL;
9
10
+$now->modify("1 day after");
11
12
13
+$now->modify("1 hour after");
14
15
16
+$now->setTime(0, 0, 0);
17
+//date_time_set($now, 0, 0, 0);
18
19
+--EXPECT--
20
+2008-10-10 01:02:03
21
+2008-10-11 01:02:03
22
+2008-10-11 02:02:03
23
+2008-10-11 00:00:00
0 commit comments