Ejemplo n.º 1
0
 public static function strftime($date_string, $format, $else, $tz = null)
 {
     if ($tz === null) {
         $tz = get_option('timezone_string');
         if (empty($tz)) {
             $tz = 'Etc/UTC';
         }
     }
     return \Missing\Dates::strftime($date_string, $format, $else, $tz);
 }
Ejemplo n.º 2
0
 public function testStrftime()
 {
     $this->assertEquals(\Missing\Dates::strftime('2014-01-01 00:00', '%H:%M', 'unknown', 'Europe/London'), '00:00');
     $this->assertEquals(\Missing\Dates::strftime('2014-06-01 00:00', '%H:%M', 'unknown', 'Europe/London'), '01:00');
     $this->assertEquals(\Missing\Dates::strftime('cats', '%H:%M', 1234, 'Europe/London'), 1234);
 }