You are here

public function DateTest::testDateTimeExcelToPHP1900Timezone in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/Shared/DateTest.php \DateTest::testDateTimeExcelToPHP1900Timezone()

@dataProvider providerDateTimeExcelToPHP1900Timezone

File

vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/Shared/DateTest.php, line 167

Class

DateTest

Code

public function testDateTimeExcelToPHP1900Timezone() {
  $result = call_user_func(array(
    'PHPExcel_Shared_Date',
    'setExcelCalendar',
  ), PHPExcel_Shared_Date::CALENDAR_WINDOWS_1900);
  $args = func_get_args();
  $expectedResult = array_pop($args);
  if ($args[0] < 1) {
    $expectedResult += gmmktime(0, 0, 0);
  }
  $result = call_user_func_array(array(
    'PHPExcel_Shared_Date',
    'ExcelToPHP',
  ), $args);
  $this
    ->assertEquals($expectedResult, $result);
}