You are here

private static function GeoTimezone::tryGetTzIndex4 in Geo Time Zone 8.3

Same name and namespace in other branches
  1. 8 src/GeoTimezone.php \Drupal\geotimezone\GeoTimezone::tryGetTzIndex4()
  2. 8.2 src/GeoTimezone.php \Drupal\geotimezone\GeoTimezone::tryGetTzIndex4()
  3. 6.2 src/GeoTimezone.php \Drupal\geotimezone\GeoTimezone::tryGetTzIndex4()
  4. 6 src/GeoTimezone.php \Drupal\geotimezone\GeoTimezone::tryGetTzIndex4()
  5. 7.2 src/GeoTimezone.php \Drupal\geotimezone\GeoTimezone::tryGetTzIndex4()
  6. 7 src/GeoTimezone.php \Drupal\geotimezone\GeoTimezone::tryGetTzIndex4()
1 call to GeoTimezone::tryGetTzIndex4()
GeoTimezone::tryGetTzIndex5 in src/GeoTimezone.php

File

src/GeoTimezone.php, line 14566
Contains \Drupal\geotimezone\GeoTimezone.

Class

GeoTimezone
Determine the time zone based on coordinates.

Namespace

Drupal\geotimezone

Code

private static function tryGetTzIndex4($lat, $lng) {
  if ($lng < -5.327115) {
    if ($lat < 10.0) {
      if ($lng < -7.365113) {
        if ($lng < -11.496679) {
          if ($lat < 7.561782) {
            return 68;
          }
          else {
            if (static::$polygon[349]
              ->isInside($lat, $lng)) {
              return 184;
            }
            else {
              return 68;
            }
          }
        }
        else {
          if ($lat < 5.327682) {
            if (static::$polygon[350]
              ->isInside($lat, $lng)) {
              return 300;
            }
            else {
              return 356;
            }
          }
          else {
            if ($lat < 7.663841) {
              if ($lng < -9.430896000000001) {
                if (static::$polygon[351]
                  ->isInside($lat, $lng)) {
                  return 68;
                }
                if (static::$polygon[352]
                  ->isInside($lat, $lng)) {
                  return 184;
                }
                else {
                  return 356;
                }
              }
              else {
                if ($lat < 6.495762) {
                  if (static::$polygon[353]
                    ->isInside($lat, $lng)) {
                    return 300;
                  }
                  else {
                    return 356;
                  }
                }
                else {
                  if ($lng < -8.398004999999999) {
                    if (static::$polygon[354]
                      ->isInside($lat, $lng)) {
                      return 184;
                    }
                    if (static::$polygon[355]
                      ->isInside($lat, $lng)) {
                      return 184;
                    }
                    if (static::$polygon[356]
                      ->isInside($lat, $lng)) {
                      return 300;
                    }
                    if (static::$polygon[357]
                      ->isInside($lat, $lng)) {
                      return 300;
                    }
                    else {
                      return 356;
                    }
                  }
                  else {
                    if (static::$polygon[358]
                      ->isInside($lat, $lng)) {
                      return 184;
                    }
                    if (static::$polygon[359]
                      ->isInside($lat, $lng)) {
                      return 356;
                    }
                    else {
                      return 300;
                    }
                  }
                }
              }
            }
            else {
              if ($lng < -9.430896000000001) {
                if ($lat < 8.831920999999999) {
                  if ($lng < -10.463788) {
                    if (static::$polygon[360]
                      ->isInside($lat, $lng)) {
                      return 184;
                    }
                    if (static::$polygon[361]
                      ->isInside($lat, $lng)) {
                      return 356;
                    }
                    else {
                      return 68;
                    }
                  }
                  else {
                    if (static::$polygon[362]
                      ->isInside($lat, $lng)) {
                      return 68;
                    }
                    if (static::$polygon[363]
                      ->isInside($lat, $lng)) {
                      return 184;
                    }
                    if (static::$polygon[364]
                      ->isInside($lat, $lng)) {
                      return 184;
                    }
                    else {
                      return 356;
                    }
                  }
                }
                else {
                  if (static::$polygon[365]
                    ->isInside($lat, $lng)) {
                    return 68;
                  }
                  else {
                    return 184;
                  }
                }
              }
              else {
                if ($lat < 8.831920999999999) {
                  if ($lng < -8.398004999999999) {
                    if (static::$polygon[366]
                      ->isInside($lat, $lng)) {
                      return 356;
                    }
                    if (static::$polygon[367]
                      ->isInside($lat, $lng)) {
                      return 356;
                    }
                    if (static::$polygon[368]
                      ->isInside($lat, $lng)) {
                      return 356;
                    }
                    else {
                      return 184;
                    }
                  }
                  else {
                    if (static::$polygon[369]
                      ->isInside($lat, $lng)) {
                      return 184;
                    }
                    else {
                      return 300;
                    }
                  }
                }
                else {
                  if (static::$polygon[370]
                    ->isInside($lat, $lng)) {
                    return 300;
                  }
                  else {
                    return 184;
                  }
                }
              }
            }
          }
        }
      }
      else {
        if ($lat < -15.89719) {
          return 156;
        }
        else {
          return 300;
        }
      }
    }
    else {
      if ($lat < 11.842492) {
        if ($lng < -8.890819) {
          return 184;
        }
        else {
          if ($lng < -7.108967) {
            if ($lat < 10.921246) {
              if (static::$polygon[371]
                ->isInside($lat, $lng)) {
                return 184;
              }
              if (static::$polygon[372]
                ->isInside($lat, $lng)) {
                return 300;
              }
              else {
                return 181;
              }
            }
            else {
              if (static::$polygon[373]
                ->isInside($lat, $lng)) {
                return 184;
              }
              else {
                return 181;
              }
            }
          }
          else {
            if ($lat < 10.921246) {
              if ($lng < -6.218041) {
                if (static::$polygon[374]
                  ->isInside($lat, $lng)) {
                  return 181;
                }
                if (static::$polygon[375]
                  ->isInside($lat, $lng)) {
                  return 181;
                }
                if (static::$polygon[376]
                  ->isInside($lat, $lng)) {
                  return 181;
                }
                if (static::$polygon[377]
                  ->isInside($lat, $lng)) {
                  return 181;
                }
                if (static::$polygon[378]
                  ->isInside($lat, $lng)) {
                  return 181;
                }
                else {
                  return 300;
                }
              }
              else {
                if (static::$polygon[379]
                  ->isInside($lat, $lng)) {
                  return 181;
                }
                if (static::$polygon[380]
                  ->isInside($lat, $lng)) {
                  return 262;
                }
                else {
                  return 300;
                }
              }
            }
            else {
              if (static::$polygon[381]
                ->isInside($lat, $lng)) {
                return 262;
              }
              if (static::$polygon[382]
                ->isInside($lat, $lng)) {
                return 262;
              }
              else {
                return 181;
              }
            }
          }
        }
      }
      else {
        if ($lat < 16.333138) {
          if ($lng < -8.890819) {
            if ($lat < 14.087815) {
              if ($lng < -10.672671) {
                if ($lat < 12.965153) {
                  if ($lng < -11.563597) {
                    if (static::$polygon[383]
                      ->isInside($lat, $lng)) {
                      return 225;
                    }
                    else {
                      return 184;
                    }
                  }
                  else {
                    if ($lat < 12.403823) {
                      if (static::$polygon[384]
                        ->isInside($lat, $lng)) {
                        return 181;
                      }
                      else {
                        return 184;
                      }
                    }
                    else {
                      if (static::$polygon[385]
                        ->isInside($lat, $lng)) {
                        return 184;
                      }
                      if (static::$polygon[386]
                        ->isInside($lat, $lng)) {
                        return 225;
                      }
                      else {
                        return 181;
                      }
                    }
                  }
                }
                else {
                  if (static::$polygon[387]
                    ->isInside($lat, $lng)) {
                    return 225;
                  }
                  if (static::$polygon[388]
                    ->isInside($lat, $lng)) {
                    return 225;
                  }
                  else {
                    return 181;
                  }
                }
              }
              else {
                if (static::$polygon[389]
                  ->isInside($lat, $lng)) {
                  return 184;
                }
                else {
                  return 181;
                }
              }
            }
            else {
              if ($lng < -10.672671) {
                if ($lat < 15.210476) {
                  if (static::$polygon[390]
                    ->isInside($lat, $lng)) {
                    return 33;
                  }
                  if (static::$polygon[391]
                    ->isInside($lat, $lng)) {
                    return 33;
                  }
                  if (static::$polygon[392]
                    ->isInside($lat, $lng)) {
                    return 225;
                  }
                  else {
                    return 181;
                  }
                }
                else {
                  if (static::$polygon[393]
                    ->isInside($lat, $lng)) {
                    return 33;
                  }
                  else {
                    return 181;
                  }
                }
              }
              else {
                if (static::$polygon[394]
                  ->isInside($lat, $lng)) {
                  return 181;
                }
                else {
                  return 33;
                }
              }
            }
          }
          else {
            if (static::$polygon[395]
              ->isInside($lat, $lng)) {
              return 33;
            }
            if (static::$polygon[396]
              ->isInside($lat, $lng)) {
              return 184;
            }
            else {
              return 181;
            }
          }
        }
        else {
          if (static::$polygon[397]
            ->isInside($lat, $lng)) {
            return 181;
          }
          else {
            return 33;
          }
        }
      }
    }
  }
  else {
    if ($lat < 4.509286) {
      if ($lat < 0.415882) {
        if ($lng < 5.635208) {
          return 201;
        }
        else {
          return 161;
        }
      }
      else {
        return 96;
      }
    }
    else {
      if ($lat < 11.173301) {
        if ($lng < -0.273275) {
          if ($lat < 7.955012) {
            if (static::$polygon[398]
              ->isInside($lat, $lng)) {
              return 300;
            }
            else {
              return 70;
            }
          }
          else {
            if ($lng < -2.800195) {
              if ($lat < 9.564156000000001) {
                if (static::$polygon[399]
                  ->isInside($lat, $lng)) {
                  return 262;
                }
                else {
                  return 300;
                }
              }
              else {
                if ($lng < -4.063655) {
                  if ($lat < 10.368729) {
                    if ($lng < -4.695385) {
                      if (static::$polygon[400]
                        ->isInside($lat, $lng)) {
                        return 300;
                      }
                      else {
                        return 262;
                      }
                    }
                    else {
                      if (static::$polygon[401]
                        ->isInside($lat, $lng)) {
                        return 300;
                      }
                      else {
                        return 262;
                      }
                    }
                  }
                  else {
                    return 262;
                  }
                }
                else {
                  if (static::$polygon[402]
                    ->isInside($lat, $lng)) {
                    return 70;
                  }
                  if (static::$polygon[403]
                    ->isInside($lat, $lng)) {
                    return 70;
                  }
                  if (static::$polygon[404]
                    ->isInside($lat, $lng)) {
                    return 300;
                  }
                  else {
                    return 262;
                  }
                }
              }
            }
            else {
              if ($lat < 9.564156000000001) {
                if (static::$polygon[405]
                  ->isInside($lat, $lng)) {
                  return 70;
                }
                if (static::$polygon[406]
                  ->isInside($lat, $lng)) {
                  return 262;
                }
                else {
                  return 300;
                }
              }
              else {
                if (static::$polygon[407]
                  ->isInside($lat, $lng)) {
                  return 70;
                }
                else {
                  return 262;
                }
              }
            }
          }
        }
        else {
          if ($lng < 1.806693) {
            if ($lat < 8.347417999999999) {
              if ($lat < 6.934477) {
                if ($lng < 0.766709) {
                  if (static::$polygon[408]
                    ->isInside($lat, $lng)) {
                    return 272;
                  }
                  else {
                    return 70;
                  }
                }
                else {
                  if (static::$polygon[409]
                    ->isInside($lat, $lng)) {
                    return 70;
                  }
                  if (static::$polygon[410]
                    ->isInside($lat, $lng)) {
                    return 84;
                  }
                  if (static::$polygon[411]
                    ->isInside($lat, $lng)) {
                    return 84;
                  }
                  else {
                    return 272;
                  }
                }
              }
              else {
                if (static::$polygon[412]
                  ->isInside($lat, $lng)) {
                  return 70;
                }
                if (static::$polygon[413]
                  ->isInside($lat, $lng)) {
                  return 84;
                }
                else {
                  return 272;
                }
              }
            }
            else {
              if ($lat < 9.760358999999999) {
                if (static::$polygon[414]
                  ->isInside($lat, $lng)) {
                  return 70;
                }
                if (static::$polygon[415]
                  ->isInside($lat, $lng)) {
                  return 84;
                }
                else {
                  return 272;
                }
              }
              else {
                if ($lng < 0.766709) {
                  if (static::$polygon[416]
                    ->isInside($lat, $lng)) {
                    return 70;
                  }
                  if (static::$polygon[417]
                    ->isInside($lat, $lng)) {
                    return 262;
                  }
                  else {
                    return 272;
                  }
                }
                else {
                  if (static::$polygon[418]
                    ->isInside($lat, $lng)) {
                    return 262;
                  }
                  if (static::$polygon[419]
                    ->isInside($lat, $lng)) {
                    return 272;
                  }
                  else {
                    return 84;
                  }
                }
              }
            }
          }
          else {
            if ($lat < 7.841293) {
              if (static::$polygon[420]
                ->isInside($lat, $lng)) {
                return 84;
              }
              else {
                return 96;
              }
            }
            else {
              if ($lng < 4.465083) {
                if ($lat < 9.507296999999999) {
                  if (static::$polygon[421]
                    ->isInside($lat, $lng)) {
                    return 96;
                  }
                  else {
                    return 84;
                  }
                }
                else {
                  if (static::$polygon[422]
                    ->isInside($lat, $lng)) {
                    return 96;
                  }
                  else {
                    return 84;
                  }
                }
              }
              else {
                return 96;
              }
            }
          }
        }
      }
      else {
        if ($lng < -5.199527) {
          if ($lat < 11.432508) {
            if (static::$polygon[423]
              ->isInside($lat, $lng)) {
              return 181;
            }
            else {
              return 262;
            }
          }
          else {
            if ($lat < 11.788111) {
              if (static::$polygon[424]
                ->isInside($lat, $lng)) {
                return 262;
              }
              else {
                return 181;
              }
            }
            else {
              if (static::$polygon[425]
                ->isInside($lat, $lng)) {
                return 181;
              }
              else {
                return 262;
              }
            }
          }
        }
        else {
          if ($lat < 15.082593) {
            if ($lng < -0.462076) {
              if ($lng < -2.830801) {
                if ($lat < 13.127947) {
                  if (static::$polygon[426]
                    ->isInside($lat, $lng)) {
                    return 181;
                  }
                  else {
                    return 262;
                  }
                }
                else {
                  if (static::$polygon[427]
                    ->isInside($lat, $lng)) {
                    return 262;
                  }
                  else {
                    return 181;
                  }
                }
              }
              else {
                if (static::$polygon[428]
                  ->isInside($lat, $lng)) {
                  return 181;
                }
                else {
                  return 262;
                }
              }
            }
            else {
              if ($lng < 3.330698) {
                if ($lat < 13.127947) {
                  if ($lng < 1.434311) {
                    if (static::$polygon[429]
                      ->isInside($lat, $lng)) {
                      return 84;
                    }
                    if (static::$polygon[430]
                      ->isInside($lat, $lng)) {
                      return 260;
                    }
                    else {
                      return 262;
                    }
                  }
                  else {
                    if ($lat < 12.150624) {
                      if (static::$polygon[431]
                        ->isInside($lat, $lng)) {
                        return 260;
                      }
                      if (static::$polygon[432]
                        ->isInside($lat, $lng)) {
                        return 260;
                      }
                      if (static::$polygon[433]
                        ->isInside($lat, $lng)) {
                        return 262;
                      }
                      else {
                        return 84;
                      }
                    }
                    else {
                      if (static::$polygon[434]
                        ->isInside($lat, $lng)) {
                        return 84;
                      }
                      if (static::$polygon[435]
                        ->isInside($lat, $lng)) {
                        return 262;
                      }
                      else {
                        return 260;
                      }
                    }
                  }
                }
                else {
                  if (static::$polygon[436]
                    ->isInside($lat, $lng)) {
                    return 181;
                  }
                  if (static::$polygon[437]
                    ->isInside($lat, $lng)) {
                    return 262;
                  }
                  else {
                    return 260;
                  }
                }
              }
              else {
                if (static::$polygon[438]
                  ->isInside($lat, $lng)) {
                  return 84;
                }
                if (static::$polygon[439]
                  ->isInside($lat, $lng)) {
                  return 96;
                }
                else {
                  return 260;
                }
              }
            }
          }
          else {
            if ($lng < 0.961973) {
              return 181;
            }
            else {
              if ($lng < 4.042722) {
                if (static::$polygon[440]
                  ->isInside($lat, $lng)) {
                  return 260;
                }
                if (static::$polygon[441]
                  ->isInside($lat, $lng)) {
                  return 380;
                }
                else {
                  return 181;
                }
              }
              else {
                if (static::$polygon[442]
                  ->isInside($lat, $lng)) {
                  return 181;
                }
                if (static::$polygon[443]
                  ->isInside($lat, $lng)) {
                  return 380;
                }
                else {
                  return 260;
                }
              }
            }
          }
        }
      }
    }
  }
}