Summary | Horde_Rdo_Mapper sets created_at, forgets updated_at |
Queue | Horde Framework Packages |
Type | Bug |
State | Feedback |
Priority | 1. Low |
Owners | |
Requester | birnbacs (at) gmail (dot) com |
Created | 04/03/2018 (2598 days ago) |
Due | 05/01/2018 (2570 days ago) |
Updated | 04/07/2019 (2229 days ago) |
Assigned | 04/07/2019 (2229 days ago) |
Resolved | |
Milestone | |
Patch | No |
file for a fix for both problems. The amended lines are marked with
this ticket's number 14803
Not saying it shouldn't be a datetime, but changing this to *assume*
it's a datetime field is a BC break.
New Attachment: Mapper[1].php
for a fix for both problems. The amended lines are marked with this
ticket's number 14803
ff.) should also use the Horde_Date object:
public function create($fields)
{
// If configured to record creation and update times, set them
// here. We set updated_at to the initial creation time so it's
// always set.
if ($this->_setTimestamps) {
$time = time();
$fields['created_at'] = new Horde_Date(time()); //$time;
$fields['updated_at'] = new Horde_Date(time()); //$time;
}
New Attachment: Mapper.php
Please note the change around line 408 of enclosed Mapper.php:
[...]
// If configured to record update time, set it here.
if ($this->_setTimestamps) {
//$fields['updated_at'] = time();
$fields['updated_at'] = new Horde_Date(time());
}
[...]
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Horde_Rdo_Mapper sets created_at, forgets updated_at
Due ⇒ 05/01/2018
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Horde_Db_Migration_Base object. Columns created_at and updated_at are
created right away in the backend.
According to Mapper.php (line 342 ff.), both fields should be set to
the current timestamp on create(). According to lines 388 ff.
updated_at should be set on update(). While created_at functions all
right, updated_at remains set to 0000-00-00 00:00:00. No change on
creation or update.