xref: /PHP-8.3/ext/pdo_dblib/tests/bug_54648.phpt (revision 74859783)
1--TEST--
2PDO_DBLIB: Does not force correct dateformat
3--EXTENSIONS--
4pdo_dblib
5--SKIPIF--
6<?php
7require __DIR__ . '/config.inc';
8?>
9--FILE--
10<?php
11require __DIR__ . '/config.inc';
12$db->query('set dateformat ymd');
13$rs = $db->query("select cast('1950-01-18 23:00:00' as smalldatetime) as sdt, cast('2030-01-01 23:59:59' as datetime) as dt");
14var_dump($rs->fetchAll(PDO::FETCH_ASSOC));
15echo "Done.\n";
16?>
17--EXPECT--
18array(1) {
19  [0]=>
20  array(2) {
21    ["sdt"]=>
22    string(19) "1950-01-18 23:00:00"
23    ["dt"]=>
24    string(19) "2030-01-01 23:59:59"
25  }
26}
27Done.
28