function apply($peer, $object) { $object[$this->field_name] = DateTimeUtils::mysql_now(); return array($peer, $object); }
function testMysqlNow() { $mysql_now = DateTimeUtils::mysql_now(); $matches = array(); $this->assertTrue(preg_match("/\\A\\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d:\\d\\d\\Z/", $mysql_now, $matches), "Il formato ritornato non e' corretto!!"); }