Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
221
Merge Requests
221
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
3cd89e1b
Commit
3cd89e1b
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
2373cb01
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 @
3cd89e1b
...
...
@@ -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 @
3cd89e1b
...
...
@@ -38,7 +38,7 @@ public function setUp() {
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