Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
Guilherme Filippo
ISPConfig 3
Commits
5241cce4
Commit
5241cce4
authored
Sep 07, 2010
by
tbrehm
Browse files
Improved date parsing routine in tform library to add support for different date formats.
parent
10f83867
Changes
1
Hide whitespace changes
Inline
Side-by-side
interface/lib/classes/tform.inc.php
View file @
5241cce4
...
...
@@ -620,8 +620,9 @@ class tform {
break
;
case
'DATE'
:
if
(
$record
[
$key
]
!=
''
&&
$record
[
$key
]
!=
'0000-00-00'
)
{
list
(
$tag
,
$monat
,
$jahr
)
=
explode
(
'.'
,
$record
[
$key
]);
$new_record
[
$key
]
=
$jahr
.
'-'
.
$monat
.
'-'
.
$tag
;
$date_parts
=
date_parse_from_format
(
$this
->
dateformat
,
$record
[
$key
]);
//list($tag,$monat,$jahr) = explode('.',$record[$key]);
$new_record
[
$key
]
=
$date_parts
[
'year'
]
.
'-'
.
$date_parts
[
'month'
]
.
'-'
.
$date_parts
[
'day'
];
//$tmp = strptime($record[$key],$this->dateformat);
//$new_record[$key] = ($tmp['tm_year']+1900).'-'.($tmp['tm_mon']+1).'-'.$tmp['tm_mday'];
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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