Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
e171b487
Commit
e171b487
authored
May 12, 2019
by
Carsten Rose
Browse files
Support.php: Fixes #8315.
parent
b86172fb
Pipeline
#1840
passed with stage
in 2 minutes and 20 seconds
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
extension/Source/core/helper/Support.php
View file @
e171b487
...
...
@@ -470,7 +470,7 @@ class Support {
* Returned value will be 'date only', 'datetime' oder 'time only', depending on the input value.
*
* @param string $dateTimeString
* @param string $dateFormat
* @param string $dateFormat
FORMAT_DATE_INTERNATIONAL | FORMAT_DATE_GERMAN
* @param string $showZero
* @param string $showTime
* @param string $showSeconds
...
...
@@ -484,6 +484,7 @@ class Support {
$newDate
=
''
;
$newTime
=
''
;
$delim
=
''
;
$flagDateAndTime
=
false
;
$dateTimeString
=
trim
(
$dateTimeString
);
...
...
@@ -517,13 +518,15 @@ class Support {
case
2
:
$givenDate
=
$arr
[
0
];
$givenTime
=
$arr
[
1
];
$flagDateAndTime
=
true
;
default
:
}
// Date
if
(
$givenDate
!=
''
)
{
if
(
$givenDate
==
'0'
)
if
(
$givenDate
==
'0'
)
{
$givenDate
=
'0000-00-00'
;
}
$arr
=
self
::
splitDateToArray
(
$givenDate
);
...
...
@@ -539,8 +542,9 @@ class Support {
// Time
if
(
$givenTime
!=
''
)
{
if
(
$givenTime
==
'0'
)
if
(
$givenTime
==
'0'
)
{
$givenTime
=
'0:0:0'
;
}
$arr
=
explode
(
':'
,
$givenTime
);
if
(
count
(
$arr
)
<
3
)
{
...
...
@@ -554,7 +558,7 @@ class Support {
}
}
if
(
strlen
(
$dateTimeString
)
>
15
)
{
if
(
$flagDateAndTime
)
{
$delim
=
' '
;
}
...
...
extension/Tests/unit/core/helper/SupportTest.php
View file @
e171b487
This diff is collapsed.
Click to expand it.
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