Looking at version 1.11
//get the last modified data $result = $this->EE->db->get_where('channel_titles', array('entry_id' => $entry_id))->row(); if(!empty($date->edit_date)) { $date = date('Y-m-d',$this->EE->localize->timestamp_to_gmt($date->edit_date)); } else { $date = date('Y-m-d'); }
channel_titles data is put in $result, but then we check $date->edit_date, which is always empty. Furthermore, the edit_date we get back is in a stupid format that’s neither usable as a timestamp or a string, e.g. 20160127155023, so you need to do some massaging to it first to get it in a yyyy-mm-dd format, for example:
$date = substr($result->edit_date, 0, 4).'-'.substr($result->edit_date, 4, 2).'-'.substr($result->edit_date, 6, 2);
|