formatTimestamp() public static method

Returns formatted Unix timestamp.
public static formatTimestamp ( integer $timestamp, string $format = self::DEFAULT_TIME_FORMAT, string $timezone = self::DEFAULT_TIMEZONE ) : string
$timestamp integer
$format string
$timezone string
return string
Ejemplo n.º 1
0
 /**
  * @test
  */
 public function shouldFormatTimestamp()
 {
     //given
     $timestamp = '1417083911';
     //when
     $date = Date::formatTimestamp($timestamp);
     //then
     $this->assertEquals('2014-11-27 10:25', $date);
 }