Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
a5c24191
Commit
a5c24191
authored
Nov 16, 2020
by
catch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#3118591
by alexpott, xjm, chesnut: Datetime-related test failures on PostgreSQL 12
(cherry picked from commit
1111de84
)
parent
ee387f37
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
core/modules/views/src/Plugin/views/query/PostgresqlDateSql.php
...odules/views/src/Plugin/views/query/PostgresqlDateSql.php
+1
-1
core/modules/views/tests/src/Unit/Plugin/views/query/PostgresqlDateSqlTest.php
...sts/src/Unit/Plugin/views/query/PostgresqlDateSqlTest.php
+1
-1
No files found.
core/modules/views/src/Plugin/views/query/PostgresqlDateSql.php
View file @
a5c24191
...
...
@@ -66,7 +66,7 @@ public function __construct(Connection $database) {
public
function
getDateField
(
$field
,
$string_date
)
{
if
(
$string_date
)
{
// Ensures compatibility with field offset operation below.
return
"TO_TIMESTAMP(
$field
, 'YYYY-MM-DD
HH24:MI:SS')"
;
return
"TO_TIMESTAMP(
$field
, 'YYYY-MM-DD
\"
T
\"
HH24:MI:SS')"
;
}
return
"TO_TIMESTAMP(
$field
)"
;
}
...
...
core/modules/views/tests/src/Unit/Plugin/views/query/PostgresqlDateSqlTest.php
View file @
a5c24191
...
...
@@ -38,7 +38,7 @@ public function setUp(): void {
public
function
testGetDateField
()
{
$date_sql
=
new
PostgresqlDateSql
(
$this
->
database
);
$expected
=
"TO_TIMESTAMP(foo.field, 'YYYY-MM-DD
HH24:MI:SS')"
;
$expected
=
"TO_TIMESTAMP(foo.field, 'YYYY-MM-DD
\"
T
\"
HH24:MI:SS')"
;
$this
->
assertEquals
(
$expected
,
$date_sql
->
getDateField
(
'foo.field'
,
TRUE
));
$expected
=
'TO_TIMESTAMP(foo.field)'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment