Permalink
Browse files

Fixes Relatable to save date correctly.

The NOW() expression wasn't working, causing zero dates and failures
under strict mode.
  • Loading branch information...
zerocrates committed Jun 14, 2011
1 parent 3c62824 commit 1a28af39fbe5a534c9cf0410e67244e271e2e355
Showing with 2 additions and 2 deletions.
  1. +2 −2 application/models/Relatable.php
@@ -175,7 +175,7 @@ public function addRelatedTo($entity, $relationship )
'entity_id' => $entity_id,
'relation_id' => $relation_id,
'relationship_id' => $relationship_id,
- 'time' => new Zend_Db_Expr('NOW()'),
+ 'time' => Zend_Date::now()->toString(Omeka_Record::DATE_FORMAT),
'type' => $this->type
));
}
@@ -313,4 +313,4 @@ public function addRelatedIfNotExists($entity, $rel) {
}
return false;
}
-}
+}

0 comments on commit 1a28af3

Please sign in to comment.