Pop\Log\Logger::setTimestamp PHP Method

setTimestamp() public method

Method to set timestamp format
public setTimestamp ( string $format = 'Y-m-d H:i:s' ) : Logger
$format string
return Logger
    public function setTimestamp($format = 'Y-m-d H:i:s')
    {
        $this->timestamp = $format;
        return $this;
    }

Usage Example

Esempio n. 1
0
 public function testSetAndGetTimestamp()
 {
     $l = new Logger();
     $l->setTimestamp('Y-m-d');
     $this->assertEquals('Y-m-d', $l->getTimestamp());
 }