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

コード例 #1
0
ファイル: LogTest.php プロジェクト: nicksagona/PopPHP
 public function testSetAndGetTimestamp()
 {
     $l = new Logger();
     $l->setTimestamp('Y-m-d');
     $this->assertEquals('Y-m-d', $l->getTimestamp());
 }