mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Fix for empty start date becoming 1970
This commit is contained in:
@@ -123,7 +123,7 @@ class Update extends CI_Controller {
|
||||
'cont' => (string) $record->cont,
|
||||
'long' => (float) $record->long,
|
||||
'lat' => (float) $record->lat,
|
||||
'start' => $record->start ? date('Y-m-d H:i:s', strtotime($record->start)) : null,
|
||||
'start' => (!empty($record->start) && strtotime($record->start)) ? date('Y-m-d H:i:s', strtotime($record->start)) : null,
|
||||
'end' => $record->end ? date('Y-m-d H:i:s', strtotime($record->end)) : null,
|
||||
];
|
||||
|
||||
@@ -174,7 +174,7 @@ class Update extends CI_Controller {
|
||||
'cont' => (string) $record->cont,
|
||||
'long' => (float) $record->long,
|
||||
'lat' => (float) $record->lat,
|
||||
'start' => $record->start ? date('Y-m-d H:i:s', strtotime($record->start)) : null,
|
||||
'start' => (!empty($record->start) && strtotime($record->start)) ? date('Y-m-d H:i:s', strtotime($record->start)) : null,
|
||||
'end' => $record->end ? date('Y-m-d H:i:s', strtotime($record->end)) : null,
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user