/**
  * @PrePersist
  * @PreUpdate
  */
 public function updateTimestamps()
 {
     $this->_updated = MySqlDateTime::nowTimestamp();
     if ($this->_created == '') {
         $this->_created = MySqlDateTime::nowTimestamp();
     }
 }
Example #2
0
 public function test_proper_length_of_datetime_string_returned()
 {
     $mysqlNow = MySqlDateTime::nowTimestamp();
     $this->assertEqual(strlen($mysqlNow), 19);
 }