You are here

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

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

File

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

Class

GeoTimezone
Determine the time zone based on coordinates.

Namespace

Drupal\geotimezone

Code

private static function tryGetTzIndex9($lat, $lng) {
  if ($lat < 25.453518) {
    if ($lng < -108.089081) {
      return 407;
    }
    else {
      if ($lat < 24.790808) {
        if ($lng < -101.290734) {
          if ($lng < -106.203979) {
            if ($lat < 21.819218) {
              return 407;
            }
            else {
              if (static::$polygon[652]
                ->isInside($lat, $lng)) {
                return 384;
              }
              else {
                return 407;
              }
            }
          }
          else {
            if ($lng < -102.505865) {
              if ($lat < 22.582341) {
                if ($lng < -104.208678) {
                  if (static::$polygon[653]
                    ->isInside($lat, $lng)) {
                    return 34;
                  }
                  if (static::$polygon[654]
                    ->isInside($lat, $lng)) {
                    return 192;
                  }
                  if (static::$polygon[655]
                    ->isInside($lat, $lng)) {
                    return 192;
                  }
                  if (static::$polygon[656]
                    ->isInside($lat, $lng)) {
                    return 384;
                  }
                  if (static::$polygon[657]
                    ->isInside($lat, $lng)) {
                    return 384;
                  }
                  else {
                    return 407;
                  }
                }
                else {
                  if (static::$polygon[658]
                    ->isInside($lat, $lng)) {
                    return 407;
                  }
                  else {
                    return 192;
                  }
                }
              }
              else {
                if (static::$polygon[659]
                  ->isInside($lat, $lng)) {
                  return 192;
                }
                if (static::$polygon[660]
                  ->isInside($lat, $lng)) {
                  return 407;
                }
                if (static::$polygon[661]
                  ->isInside($lat, $lng)) {
                  return 407;
                }
                else {
                  return 384;
                }
              }
            }
            else {
              if ($lng < -101.403413) {
                if (static::$polygon[662]
                  ->isInside($lat, $lng)) {
                  return 384;
                }
                else {
                  return 192;
                }
              }
              else {
                if (static::$polygon[663]
                  ->isInside($lat, $lng)) {
                  return 384;
                }
                else {
                  return 192;
                }
              }
            }
          }
        }
        else {
          if ($lng < -97.596219) {
            if ($lat < 24.653814) {
              if ($lng < -97.73138400000001) {
                if ($lat < 22.513844) {
                  if (static::$polygon[664]
                    ->isInside($lat, $lng)) {
                    return 384;
                  }
                  else {
                    return 192;
                  }
                }
                else {
                  if (static::$polygon[665]
                    ->isInside($lat, $lng)) {
                    return 192;
                  }
                  else {
                    return 384;
                  }
                }
              }
              else {
                if ($lat < 22.034286) {
                  return 192;
                }
                else {
                  return 384;
                }
              }
            }
            else {
              if ($lng < -101.085294) {
                if (static::$polygon[666]
                  ->isInside($lat, $lng)) {
                  return 384;
                }
                else {
                  return 192;
                }
              }
              else {
                return 384;
              }
            }
          }
          else {
            return 192;
          }
        }
      }
      else {
        if ($lng < -101.222706) {
          if ($lng < -108.03894) {
            return 407;
          }
          else {
            if ($lng < -101.585564) {
              if ($lng < -106.8924) {
                if (static::$polygon[667]
                  ->isInside($lat, $lng)) {
                  return 384;
                }
                else {
                  return 407;
                }
              }
              else {
                if (static::$polygon[668]
                  ->isInside($lat, $lng)) {
                  return 192;
                }
                else {
                  return 384;
                }
              }
            }
            else {
              if ($lng < -101.332363) {
                if (static::$polygon[669]
                  ->isInside($lat, $lng)) {
                  return 192;
                }
                else {
                  return 384;
                }
              }
              else {
                if (static::$polygon[670]
                  ->isInside($lat, $lng)) {
                  return 192;
                }
                else {
                  return 384;
                }
              }
            }
          }
        }
        else {
          return 384;
        }
      }
    }
  }
  else {
    if ($lng < -97.406975) {
      if ($lat < 35.257645) {
        return static::tryGetTzIndex7($lat, $lng);
      }
      else {
        if ($lng < -108.883) {
          if ($lat < 37.340875) {
            if ($lng < -109.941851) {
              if ($lat < 36.29926) {
                if ($lng < -110.471276) {
                  if (static::$polygon[671]
                    ->isInside($lat, $lng)) {
                    return 9;
                  }
                  if (static::$polygon[672]
                    ->isInside($lat, $lng)) {
                    return 9;
                  }
                  else {
                    return 273;
                  }
                }
                else {
                  if (static::$polygon[673]
                    ->isInside($lat, $lng)) {
                    return 9;
                  }
                  if (static::$polygon[674]
                    ->isInside($lat, $lng)) {
                    return 9;
                  }
                  if (static::$polygon[675]
                    ->isInside($lat, $lng)) {
                    return 9;
                  }
                  else {
                    return 273;
                  }
                }
              }
              else {
                if (static::$polygon[676]
                  ->isInside($lat, $lng)) {
                  return 9;
                }
                if (static::$polygon[677]
                  ->isInside($lat, $lng)) {
                  return 9;
                }
                else {
                  return 273;
                }
              }
            }
            else {
              return 273;
            }
          }
          else {
            if (static::$polygon[678]
              ->isInside($lat, $lng)) {
              return 227;
            }
            if (static::$polygon[679]
              ->isInside($lat, $lng)) {
              return 227;
            }
            if (static::$polygon[680]
              ->isInside($lat, $lng)) {
              return 273;
            }
            else {
              return 308;
            }
          }
        }
        else {
          if ($lat < 47.575298) {
            if ($lng < -103.093439) {
              if ($lng < -103.434273) {
                if (static::$polygon[681]
                  ->isInside($lat, $lng)) {
                  return 160;
                }
                else {
                  return 273;
                }
              }
              else {
                if (static::$polygon[682]
                  ->isInside($lat, $lng)) {
                  return 160;
                }
                else {
                  return 273;
                }
              }
            }
            else {
              if ($lng < -102.432684) {
                if ($lat < 36.998989) {
                  if (static::$polygon[683]
                    ->isInside($lat, $lng)) {
                    return 160;
                  }
                  else {
                    return 273;
                  }
                }
                else {
                  if (static::$polygon[684]
                    ->isInside($lat, $lng)) {
                    return 160;
                  }
                  else {
                    return 273;
                  }
                }
              }
              else {
                if ($lat < 41.416471) {
                  if (static::$polygon[685]
                    ->isInside($lat, $lng)) {
                    return 273;
                  }
                  else {
                    return 160;
                  }
                }
                else {
                  if ($lat < 44.495885) {
                    if (static::$polygon[686]
                      ->isInside($lat, $lng)) {
                      return 273;
                    }
                    else {
                      return 160;
                    }
                  }
                  else {
                    if ($lng < -99.91982899999999) {
                      if ($lat < 46.035592) {
                        if (static::$polygon[687]
                          ->isInside($lat, $lng)) {
                          return 160;
                        }
                        else {
                          return 273;
                        }
                      }
                      else {
                        if ($lng < -101.176257) {
                          if ($lat < 46.805445) {
                            if (static::$polygon[688]
                              ->isInside($lat, $lng)) {
                              return 52;
                            }
                            if (static::$polygon[689]
                              ->isInside($lat, $lng)) {
                              return 160;
                            }
                            else {
                              return 273;
                            }
                          }
                          else {
                            if (static::$polygon[690]
                              ->isInside($lat, $lng)) {
                              return 52;
                            }
                            if (static::$polygon[691]
                              ->isInside($lat, $lng)) {
                              return 105;
                            }
                            if (static::$polygon[692]
                              ->isInside($lat, $lng)) {
                              return 160;
                            }
                            if (static::$polygon[693]
                              ->isInside($lat, $lng)) {
                              return 273;
                            }
                            else {
                              return 71;
                            }
                          }
                        }
                        else {
                          if (static::$polygon[694]
                            ->isInside($lat, $lng)) {
                            return 52;
                          }
                          if (static::$polygon[695]
                            ->isInside($lat, $lng)) {
                            return 105;
                          }
                          if (static::$polygon[696]
                            ->isInside($lat, $lng)) {
                            return 273;
                          }
                          else {
                            return 160;
                          }
                        }
                      }
                    }
                    else {
                      return 160;
                    }
                  }
                }
              }
            }
          }
          else {
            if ($lng < -103.610133) {
              if ($lat < 48.997666) {
                if (static::$polygon[697]
                  ->isInside($lat, $lng)) {
                  return 160;
                }
                if (static::$polygon[698]
                  ->isInside($lat, $lng)) {
                  return 308;
                }
                else {
                  return 273;
                }
              }
              else {
                if (static::$polygon[699]
                  ->isInside($lat, $lng)) {
                  return 74;
                }
                else {
                  return 308;
                }
              }
            }
            else {
              if ($lat < 47.674011) {
                if ($lng < -102.711964) {
                  if (static::$polygon[700]
                    ->isInside($lat, $lng)) {
                    return 273;
                  }
                  else {
                    return 160;
                  }
                }
                else {
                  if (static::$polygon[701]
                    ->isInside($lat, $lng)) {
                    return 273;
                  }
                  else {
                    return 160;
                  }
                }
              }
              else {
                if ($lat < 48.994424) {
                  if (static::$polygon[702]
                    ->isInside($lat, $lng)) {
                    return 308;
                  }
                  else {
                    return 160;
                  }
                }
                else {
                  if (static::$polygon[703]
                    ->isInside($lat, $lng)) {
                    return 308;
                  }
                  else {
                    return 284;
                  }
                }
              }
            }
          }
        }
      }
    }
    else {
      if ($lat < 27.880161) {
        if ($lat < 25.959148) {
          if ($lat < 25.643694) {
            if (static::$polygon[704]
              ->isInside($lat, $lng)) {
              return 374;
            }
            else {
              return 384;
            }
          }
          else {
            if (static::$polygon[705]
              ->isInside($lat, $lng)) {
              return 160;
            }
            else {
              return 374;
            }
          }
        }
        else {
          return 160;
        }
      }
      else {
        if ($lat < 29.84198) {
          return 160;
        }
        else {
          if (static::$polygon[706]
            ->isInside($lat, $lng)) {
            return 284;
          }
          if (static::$polygon[707]
            ->isInside($lat, $lng)) {
            return 378;
          }
          else {
            return 160;
          }
        }
      }
    }
  }
}