You are here

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

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

File

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

Class

GeoTimezone
Determine the time zone based on coordinates.

Namespace

Drupal\geotimezone

Code

private static function tryGetTzIndex32($lat, $lng) {
  if ($lat < 45.945526) {
    if ($lat < 44.510529) {
      if ($lat < 42.932393) {
        if ($lng < 46.362106) {
          if ($lng < 44.78058) {
            if ($lat < 41.802489) {
              if (static::$polygon[1807]
                ->isInside($lat, $lng)) {
                return 47;
              }
              if (static::$polygon[1808]
                ->isInside($lat, $lng)) {
                return 205;
              }
              else {
                return 48;
              }
            }
            else {
              if (static::$polygon[1809]
                ->isInside($lat, $lng)) {
                return 183;
              }
              else {
                return 47;
              }
            }
          }
          else {
            if ($lat < 41.802489) {
              if ($lng < 45.571343) {
                if (static::$polygon[1810]
                  ->isInside($lat, $lng)) {
                  return 47;
                }
                if (static::$polygon[1811]
                  ->isInside($lat, $lng)) {
                  return 48;
                }
                else {
                  return 51;
                }
              }
              else {
                if (static::$polygon[1812]
                  ->isInside($lat, $lng)) {
                  return 47;
                }
                if (static::$polygon[1813]
                  ->isInside($lat, $lng)) {
                  return 48;
                }
                else {
                  return 51;
                }
              }
            }
            else {
              if (static::$polygon[1814]
                ->isInside($lat, $lng)) {
                return 51;
              }
              if (static::$polygon[1815]
                ->isInside($lat, $lng)) {
                return 183;
              }
              else {
                return 47;
              }
            }
          }
        }
        else {
          if ($lng < 47.943632) {
            if ($lat < 41.802489) {
              if (static::$polygon[1816]
                ->isInside($lat, $lng)) {
                return 47;
              }
              if (static::$polygon[1817]
                ->isInside($lat, $lng)) {
                return 47;
              }
              if (static::$polygon[1818]
                ->isInside($lat, $lng)) {
                return 183;
              }
              else {
                return 51;
              }
            }
            else {
              if (static::$polygon[1819]
                ->isInside($lat, $lng)) {
                return 47;
              }
              if (static::$polygon[1820]
                ->isInside($lat, $lng)) {
                return 51;
              }
              else {
                return 183;
              }
            }
          }
          else {
            if (static::$polygon[1821]
              ->isInside($lat, $lng)) {
              return 183;
            }
            else {
              return 51;
            }
          }
        }
      }
      else {
        return 183;
      }
    }
    else {
      if ($lng < 47.589027) {
        if ($lat < 45.179359) {
          return 183;
        }
        else {
          if (static::$polygon[1822]
            ->isInside($lat, $lng)) {
            return 99;
          }
          else {
            return 183;
          }
        }
      }
      else {
        return 99;
      }
    }
  }
  else {
    if ($lat < 46.20314) {
      if ($lng < 49.029415) {
        if ($lng < 47.174988) {
          if (static::$polygon[1823]
            ->isInside($lat, $lng)) {
            return 183;
          }
          else {
            return 99;
          }
        }
        else {
          return 99;
        }
      }
      else {
        if ($lng < 49.248165) {
          return 99;
        }
        else {
          return 120;
        }
      }
    }
    else {
      if ($lat < 51.129581) {
        if ($lng < 49.420502) {
          if ($lat < 46.267223) {
            if ($lng < 49.135693) {
              if ($lng < 46.866653) {
                if ($lat < 46.248047) {
                  if (static::$polygon[1824]
                    ->isInside($lat, $lng)) {
                    return 99;
                  }
                  else {
                    return 183;
                  }
                }
                else {
                  if (static::$polygon[1825]
                    ->isInside($lat, $lng)) {
                    return 99;
                  }
                  else {
                    return 183;
                  }
                }
              }
              else {
                return 99;
              }
            }
            else {
              if ($lng < 49.240028) {
                return 99;
              }
              else {
                return 120;
              }
            }
          }
          else {
            if ($lng < 49.216098) {
              if ($lng < 46.207577) {
                if (static::$polygon[1826]
                  ->isInside($lat, $lng)) {
                  return 99;
                }
                else {
                  return 183;
                }
              }
              else {
                if ($lat < 48.698402) {
                  if ($lng < 47.711837) {
                    if (static::$polygon[1827]
                      ->isInside($lat, $lng)) {
                      return 115;
                    }
                    if (static::$polygon[1828]
                      ->isInside($lat, $lng)) {
                      return 120;
                    }
                    if (static::$polygon[1829]
                      ->isInside($lat, $lng)) {
                      return 183;
                    }
                    else {
                      return 99;
                    }
                  }
                  else {
                    if (static::$polygon[1830]
                      ->isInside($lat, $lng)) {
                      return 99;
                    }
                    if (static::$polygon[1831]
                      ->isInside($lat, $lng)) {
                      return 99;
                    }
                    if (static::$polygon[1832]
                      ->isInside($lat, $lng)) {
                      return 115;
                    }
                    else {
                      return 120;
                    }
                  }
                }
                else {
                  if (static::$polygon[1833]
                    ->isInside($lat, $lng)) {
                    return 99;
                  }
                  else {
                    return 115;
                  }
                }
              }
            }
            else {
              if ($lat < 46.433438) {
                if ($lat < 46.298) {
                  if ($lng < 49.220917) {
                    return 99;
                  }
                  else {
                    return 120;
                  }
                }
                else {
                  return 120;
                }
              }
              else {
                if ($lat < 48.018226) {
                  if (static::$polygon[1834]
                    ->isInside($lat, $lng)) {
                    return 115;
                  }
                  else {
                    return 120;
                  }
                }
                else {
                  if (static::$polygon[1835]
                    ->isInside($lat, $lng)) {
                    return 115;
                  }
                  else {
                    return 99;
                  }
                }
              }
            }
          }
        }
        else {
          if ($lat < 46.325863) {
            return 120;
          }
          else {
            if ($lat < 48.059217) {
              if (static::$polygon[1836]
                ->isInside($lat, $lng)) {
                return 115;
              }
              else {
                return 120;
              }
            }
            else {
              if (static::$polygon[1837]
                ->isInside($lat, $lng)) {
                return 99;
              }
              else {
                return 115;
              }
            }
          }
        }
      }
      else {
        if ($lat < 53.870827) {
          if ($lng < 46.412319) {
            if (static::$polygon[1838]
              ->isInside($lat, $lng)) {
              return 183;
            }
            else {
              return 99;
            }
          }
          else {
            if ($lng < 48.018951) {
              if (static::$polygon[1839]
                ->isInside($lat, $lng)) {
                return 99;
              }
              if (static::$polygon[1840]
                ->isInside($lat, $lng)) {
                return 99;
              }
              if (static::$polygon[1841]
                ->isInside($lat, $lng)) {
                return 157;
              }
              else {
                return 183;
              }
            }
            else {
              if ($lat < 52.500204) {
                if (static::$polygon[1842]
                  ->isInside($lat, $lng)) {
                  return 157;
                }
                if (static::$polygon[1843]
                  ->isInside($lat, $lng)) {
                  return 157;
                }
                if (static::$polygon[1844]
                  ->isInside($lat, $lng)) {
                  return 157;
                }
                else {
                  return 99;
                }
              }
              else {
                if ($lng < 48.822268) {
                  if ($lat < 53.185186) {
                    if (static::$polygon[1845]
                      ->isInside($lat, $lng)) {
                      return 99;
                    }
                    if (static::$polygon[1846]
                      ->isInside($lat, $lng)) {
                      return 157;
                    }
                    else {
                      return 183;
                    }
                  }
                  else {
                    if (static::$polygon[1847]
                      ->isInside($lat, $lng)) {
                      return 157;
                    }
                    else {
                      return 183;
                    }
                  }
                }
                else {
                  if (static::$polygon[1848]
                    ->isInside($lat, $lng)) {
                    return 99;
                  }
                  if (static::$polygon[1849]
                    ->isInside($lat, $lng)) {
                    return 99;
                  }
                  if (static::$polygon[1850]
                    ->isInside($lat, $lng)) {
                    return 183;
                  }
                  if (static::$polygon[1851]
                    ->isInside($lat, $lng)) {
                    return 183;
                  }
                  else {
                    return 157;
                  }
                }
              }
            }
          }
        }
        else {
          if ($lat < 60.069954) {
            if ($lng < 46.412319) {
              if (static::$polygon[1852]
                ->isInside($lat, $lng)) {
                return 99;
              }
              else {
                return 183;
              }
            }
            else {
              if ($lat < 56.97039) {
                if (static::$polygon[1853]
                  ->isInside($lat, $lng)) {
                  return 99;
                }
                else {
                  return 183;
                }
              }
              else {
                if ($lng < 48.018951) {
                  if ($lat < 58.520172) {
                    if ($lng < 47.215635) {
                      if (static::$polygon[1854]
                        ->isInside($lat, $lng)) {
                        return 99;
                      }
                      if (static::$polygon[1855]
                        ->isInside($lat, $lng)) {
                        return 99;
                      }
                      else {
                        return 183;
                      }
                    }
                    else {
                      if (static::$polygon[1856]
                        ->isInside($lat, $lng)) {
                        return 183;
                      }
                      if (static::$polygon[1857]
                        ->isInside($lat, $lng)) {
                        return 183;
                      }
                      else {
                        return 99;
                      }
                    }
                  }
                  else {
                    if (static::$polygon[1858]
                      ->isInside($lat, $lng)) {
                      return 183;
                    }
                    else {
                      return 99;
                    }
                  }
                }
                else {
                  if (static::$polygon[1859]
                    ->isInside($lat, $lng)) {
                    return 99;
                  }
                  else {
                    return 183;
                  }
                }
              }
            }
          }
          else {
            if (static::$polygon[1860]
              ->isInside($lat, $lng)) {
              return 99;
            }
            else {
              return 183;
            }
          }
        }
      }
    }
  }
}