Skip to content

Commit

Permalink
Merge pull request kevinkhill#259 from NelsonBaez/patch-1
Browse files Browse the repository at this point in the history
Fix "Is not a valid Timezone"
  • Loading branch information
kevinkhill authored Aug 1, 2018
2 parents ca40b5d + 3821404 commit 1e4d056
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/DataTables/DataTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -757,16 +757,8 @@ protected function isValidTimezone($tz) {
return false;
}

$timezoneList = call_user_func_array('array_merge', timezone_abbreviations_list());

$timezones = array_map(function ($timezone) {
if ($timezone['timezone_id'] != null) {
return strtolower($timezone['timezone_id']);
}
}, $timezoneList);

$timezones = array_filter($timezones, 'is_string');
$timezones = array_unique($timezones);
$timezones = timezone_identifiers_list();
$timezones = array_map('strtolower',$timezones);

return in_array(strtolower($tz), $timezones, true);
}
Expand Down

0 comments on commit 1e4d056

Please sign in to comment.