You are here

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

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

File

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

Class

GeoTimezone
Determine the time zone based on coordinates.

Namespace

Drupal\geotimezone

Code

private static function tryGetTzIndex25($lat, $lng) {
  if ($lat < 25.886833) {
    if ($lng < 38.296612) {
      if ($lng < 36.739277) {
        if ($lng < 36.155724) {
          if ($lng < 35.794861) {
            if ($lng < 35.183971) {
              if ($lng < 24.002261) {
                if ($lng < 15.562867) {
                  if (static::$polygon[1363]
                    ->isInside($lat, $lng)) {
                    return 202;
                  }
                  if (static::$polygon[1364]
                    ->isInside($lat, $lng)) {
                    return 202;
                  }
                  if (static::$polygon[1365]
                    ->isInside($lat, $lng)) {
                    return 202;
                  }
                  if (static::$polygon[1366]
                    ->isInside($lat, $lng)) {
                    return 333;
                  }
                  if (static::$polygon[1367]
                    ->isInside($lat, $lng)) {
                    return 380;
                  }
                  else {
                    return 260;
                  }
                }
                else {
                  if (static::$polygon[1368]
                    ->isInside($lat, $lng)) {
                    return 260;
                  }
                  if (static::$polygon[1369]
                    ->isInside($lat, $lng)) {
                    return 260;
                  }
                  if (static::$polygon[1370]
                    ->isInside($lat, $lng)) {
                    return 322;
                  }
                  if (static::$polygon[1371]
                    ->isInside($lat, $lng)) {
                    return 333;
                  }
                  else {
                    return 202;
                  }
                }
              }
              else {
                if (static::$polygon[1372]
                  ->isInside($lat, $lng)) {
                  return 322;
                }
                if (static::$polygon[1373]
                  ->isInside($lat, $lng)) {
                  return 333;
                }
                else {
                  return 112;
                }
              }
            }
            else {
              if ($lat < 23.146889) {
                if ($lng < 35.62336) {
                  if (static::$polygon[1374]
                    ->isInside($lat, $lng)) {
                    return 112;
                  }
                  else {
                    return 322;
                  }
                }
                else {
                  return 322;
                }
              }
              else {
                return 112;
              }
            }
          }
          else {
            return 322;
          }
        }
        else {
          if ($lat < 22.913195) {
            return 322;
          }
          else {
            if ($lng < 36.208694) {
              return 112;
            }
            else {
              return 163;
            }
          }
        }
      }
      else {
        if ($lat < 22.173639) {
          if ($lat < 17.632252) {
            if (static::$polygon[1375]
              ->isInside($lat, $lng)) {
              return 149;
            }
            else {
              return 322;
            }
          }
          else {
            return 322;
          }
        }
        else {
          return 163;
        }
      }
    }
    else {
      if ($lat < 18.27114) {
        if ($lng < 41.825443) {
          if ($lng < 40.183971) {
            if ($lat < 18.003084) {
              if ($lng < 38.562808) {
                if (static::$polygon[1376]
                  ->isInside($lat, $lng)) {
                  return 322;
                }
                else {
                  return 149;
                }
              }
              else {
                return 149;
              }
            }
            else {
              return 322;
            }
          }
          else {
            return 163;
          }
        }
        else {
          if ($lng < 42.777195) {
            return 163;
          }
          else {
            if ($lat < 16.67411) {
              if (static::$polygon[1377]
                ->isInside($lat, $lng)) {
                return 215;
              }
              else {
                return 163;
              }
            }
            else {
              if (static::$polygon[1378]
                ->isInside($lat, $lng)) {
                return 215;
              }
              else {
                return 163;
              }
            }
          }
        }
      }
      else {
        return 163;
      }
    }
  }
  else {
    if ($lng < 32.013668) {
      if ($lng < 26.336222) {
        if ($lng < 23.207056) {
          if ($lng < 11.598278) {
            if ($lat < 33.904083) {
              if ($lng < 11.071555) {
                if ($lat < 29.895458) {
                  if (static::$polygon[1379]
                    ->isInside($lat, $lng)) {
                    return 380;
                  }
                  else {
                    return 333;
                  }
                }
                else {
                  if (static::$polygon[1380]
                    ->isInside($lat, $lng)) {
                    return 333;
                  }
                  if (static::$polygon[1381]
                    ->isInside($lat, $lng)) {
                    return 380;
                  }
                  else {
                    return 318;
                  }
                }
              }
              else {
                if ($lat < 33.168999) {
                  if ($lat < 32.523556) {
                    if (static::$polygon[1382]
                      ->isInside($lat, $lng)) {
                      return 318;
                    }
                    else {
                      return 333;
                    }
                  }
                  else {
                    if (static::$polygon[1383]
                      ->isInside($lat, $lng)) {
                      return 333;
                    }
                    else {
                      return 318;
                    }
                  }
                }
                else {
                  return 318;
                }
              }
            }
            else {
              if ($lng < 8.473444000000001) {
                if ($lat < 35.242054) {
                  if (static::$polygon[1384]
                    ->isInside($lat, $lng)) {
                    return 380;
                  }
                  else {
                    return 318;
                  }
                }
                else {
                  if (static::$polygon[1385]
                    ->isInside($lat, $lng)) {
                    return 318;
                  }
                  else {
                    return 380;
                  }
                }
              }
              else {
                return 318;
              }
            }
          }
          else {
            if ($lat < 36.082027) {
              if ($lat < 35.877888) {
                if ($lat < 35.528362) {
                  if ($lat < 34.318742) {
                    return 271;
                  }
                  else {
                    return 333;
                  }
                }
                else {
                  if ($lng < 13.613921) {
                    return 271;
                  }
                  else {
                    return 302;
                  }
                }
              }
              else {
                return 302;
              }
            }
            else {
              return 152;
            }
          }
        }
        else {
          if ($lat < 32.286731) {
            if ($lng < 23.294111) {
              return 333;
            }
            else {
              if (static::$polygon[1386]
                ->isInside($lat, $lng)) {
                return 112;
              }
              else {
                return 333;
              }
            }
          }
          else {
            return 152;
          }
        }
      }
      else {
        if ($lat < 31.601473) {
          return 112;
        }
        else {
          if ($lng < 28.246389) {
            return 152;
          }
          else {
            if ($lng < 29.647083) {
              if ($lng < 29.370945) {
                return 205;
              }
              else {
                if ($lat < 36.115612) {
                  return 152;
                }
                else {
                  if ($lng < 29.513166) {
                    if ($lat < 36.188656) {
                      return 152;
                    }
                    else {
                      return 205;
                    }
                  }
                  else {
                    if (static::$polygon[1387]
                      ->isInside($lat, $lng)) {
                      return 152;
                    }
                    else {
                      return 205;
                    }
                  }
                }
              }
            }
            else {
              return 205;
            }
          }
        }
      }
    }
    else {
      if ($lng < 33.897335) {
        if ($lat < 31.414772) {
          return 112;
        }
        else {
          if ($lat < 35.429267) {
            return 174;
          }
          else {
            return 205;
          }
        }
      }
      else {
        if ($lat < 27.855917) {
          if ($lng < 34.419202) {
            return 112;
          }
          else {
            return 163;
          }
        }
        else {
          if ($lat < 28.084833) {
            if ($lng < 34.444985) {
              return 112;
            }
            else {
              return 163;
            }
          }
          else {
            if ($lat < 34.684856) {
              if ($lng < 34.546276) {
                if ($lat < 30.429844) {
                  if (static::$polygon[1388]
                    ->isInside($lat, $lng)) {
                    return 8;
                  }
                  else {
                    return 112;
                  }
                }
                else {
                  if ($lat < 31.52339) {
                    if (static::$polygon[1389]
                      ->isInside($lat, $lng)) {
                      return 112;
                    }
                    if (static::$polygon[1390]
                      ->isInside($lat, $lng)) {
                      return 255;
                    }
                    else {
                      return 8;
                    }
                  }
                  else {
                    if (static::$polygon[1391]
                      ->isInside($lat, $lng)) {
                      return 255;
                    }
                    else {
                      return 8;
                    }
                  }
                }
              }
              else {
                if ($lng < 34.55748) {
                  if ($lat < 30.410903) {
                    if (static::$polygon[1392]
                      ->isInside($lat, $lng)) {
                      return 8;
                    }
                    else {
                      return 112;
                    }
                  }
                  else {
                    if ($lat < 30.494701) {
                      if (static::$polygon[1393]
                        ->isInside($lat, $lng)) {
                        return 112;
                      }
                      else {
                        return 8;
                      }
                    }
                    else {
                      if (static::$polygon[1394]
                        ->isInside($lat, $lng)) {
                        return 112;
                      }
                      else {
                        return 8;
                      }
                    }
                  }
                }
                else {
                  if ($lng < 38.878267) {
                    if ($lat < 31.384845) {
                      if ($lng < 36.717874) {
                        if ($lat < 29.734839) {
                          if (static::$polygon[1395]
                            ->isInside($lat, $lng)) {
                            return 8;
                          }
                          if (static::$polygon[1396]
                            ->isInside($lat, $lng)) {
                            return 112;
                          }
                          if (static::$polygon[1397]
                            ->isInside($lat, $lng)) {
                            return 193;
                          }
                          else {
                            return 163;
                          }
                        }
                        else {
                          if (static::$polygon[1398]
                            ->isInside($lat, $lng)) {
                            return 112;
                          }
                          if (static::$polygon[1399]
                            ->isInside($lat, $lng)) {
                            return 163;
                          }
                          if (static::$polygon[1400]
                            ->isInside($lat, $lng)) {
                            return 193;
                          }
                          if (static::$polygon[1401]
                            ->isInside($lat, $lng)) {
                            return 344;
                          }
                          else {
                            return 8;
                          }
                        }
                      }
                      else {
                        if (static::$polygon[1402]
                          ->isInside($lat, $lng)) {
                          return 193;
                        }
                        else {
                          return 163;
                        }
                      }
                    }
                    else {
                      if ($lng < 36.717874) {
                        if ($lat < 33.034851) {
                          if ($lng < 35.637677) {
                            if ($lat < 32.209848) {
                              if (static::$polygon[1403]
                                ->isInside($lat, $lng)) {
                                return 193;
                              }
                              if (static::$polygon[1404]
                                ->isInside($lat, $lng)) {
                                return 344;
                              }
                              else {
                                return 8;
                              }
                            }
                            else {
                              if (static::$polygon[1405]
                                ->isInside($lat, $lng)) {
                                return 193;
                              }
                              if (static::$polygon[1406]
                                ->isInside($lat, $lng)) {
                                return 344;
                              }
                              if (static::$polygon[1407]
                                ->isInside($lat, $lng)) {
                                return 368;
                              }
                              if (static::$polygon[1408]
                                ->isInside($lat, $lng)) {
                                return 368;
                              }
                              else {
                                return 8;
                              }
                            }
                          }
                          else {
                            if (static::$polygon[1409]
                              ->isInside($lat, $lng)) {
                              return 8;
                            }
                            if (static::$polygon[1410]
                              ->isInside($lat, $lng)) {
                              return 8;
                            }
                            if (static::$polygon[1411]
                              ->isInside($lat, $lng)) {
                              return 193;
                            }
                            else {
                              return 368;
                            }
                          }
                        }
                        else {
                          if ($lat < 33.859854) {
                            if (static::$polygon[1412]
                              ->isInside($lat, $lng)) {
                              return 8;
                            }
                            if (static::$polygon[1413]
                              ->isInside($lat, $lng)) {
                              return 368;
                            }
                            else {
                              return 404;
                            }
                          }
                          else {
                            if (static::$polygon[1414]
                              ->isInside($lat, $lng)) {
                              return 368;
                            }
                            else {
                              return 404;
                            }
                          }
                        }
                      }
                      else {
                        if (static::$polygon[1415]
                          ->isInside($lat, $lng)) {
                          return 28;
                        }
                        if (static::$polygon[1416]
                          ->isInside($lat, $lng)) {
                          return 163;
                        }
                        if (static::$polygon[1417]
                          ->isInside($lat, $lng)) {
                          return 368;
                        }
                        else {
                          return 193;
                        }
                      }
                    }
                  }
                  else {
                    if (static::$polygon[1418]
                      ->isInside($lat, $lng)) {
                      return 163;
                    }
                    if (static::$polygon[1419]
                      ->isInside($lat, $lng)) {
                      return 193;
                    }
                    if (static::$polygon[1420]
                      ->isInside($lat, $lng)) {
                      return 368;
                    }
                    else {
                      return 28;
                    }
                  }
                }
              }
            }
            else {
              if ($lng < 34.597916) {
                if ($lat < 35.956875) {
                  return 174;
                }
                else {
                  return 205;
                }
              }
              else {
                if ($lng < 36.704777) {
                  if (static::$polygon[1421]
                    ->isInside($lat, $lng)) {
                    return 205;
                  }
                  else {
                    return 368;
                  }
                }
                else {
                  if (static::$polygon[1422]
                    ->isInside($lat, $lng)) {
                    return 368;
                  }
                  else {
                    return 28;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}