Fixed coding standards
This commit is contained in:
parent
78e382e4d6
commit
85635773e9
|
@ -737,7 +737,8 @@ function wc_timezone_string() {
|
|||
// Last try, guess timezone string manually.
|
||||
foreach ( timezone_abbreviations_list() as $abbr ) {
|
||||
foreach ( $abbr as $city ) {
|
||||
if ( (bool) date( 'I' ) === (bool) $city['dst'] && $city['timezone_id'] && intval( $city['offset'] ) === $utc_offset ) {
|
||||
// WordPress restrict the use of date(), since it's affected by timezone settings, but in this case is just what we need to guess the correct timezone.
|
||||
if ( (bool) date( 'I' ) === (bool) $city['dst'] && $city['timezone_id'] && intval( $city['offset'] ) === $utc_offset ) { // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
|
||||
return $city['timezone_id'];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue