示例#1
0
 /**
  * test conversion from full local datetime to DB time
  * @dataProvider dateTestSet
  */
 public function testToDbTimeFormatsWithTz($db, $df, $tf, $tz, $display, $dbdate)
 {
     $tf = empty($tf) ? self::DEFAULT_TIME_FORMAT : $tf;
     $this->_setPrefs($df, $tf, $tz);
     if (strpos($display, ' ') === false) {
         $display = $this->time_date->expandDate($display, "{$df} {$tf}");
     }
     $this->assertEquals($this->_timeOnly($db), $this->time_date->to_db_time($display, true), "Broken conversion for '{$df} {$tf}' with date '{$display}' and TZ {$tz}");
 }