mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 01:24:27 +02:00
Bugfix for badly formatted date time string.
This commit is contained in:
parent
ca7c608161
commit
194d80c326
2 changed files with 12 additions and 1 deletions
|
@ -86,5 +86,16 @@ class dbm {
|
|||
public static function esc_array(&$arr, $add_quotation = false) {
|
||||
array_walk($arr, 'self::esc_array_callback', $add_quotation);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks Converts any date string into a SQL compatible date string
|
||||
*
|
||||
* @param string $date a date string in any format
|
||||
* @return string SQL style date string
|
||||
*/
|
||||
public static function date($date) {
|
||||
$timestamp = strtotime($date);
|
||||
return date('Y-m-d H:i:s');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue