You are here

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

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

File

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

Class

GeoTimezone
Determine the time zone based on coordinates.

Namespace

Drupal\geotimezone

Code

private static function tryGetTzIndex10($lat, $lng) {
  if ($lat < 44.018513) {
    if ($lng < -87.921288) {
      return 160;
    }
    else {
      if ($lng < -84.575844) {
        if ($lat < 30.474203) {
          if ($lng < -85.625534) {
            return 160;
          }
          else {
            if ($lat < 29.760227) {
              return 165;
            }
            else {
              if ($lng < -84.981323) {
                if ($lat < 30.444105) {
                  if (static::$polygon[708]
                    ->isInside($lat, $lng)) {
                    return 165;
                  }
                  else {
                    return 160;
                  }
                }
                else {
                  if (static::$polygon[709]
                    ->isInside($lat, $lng)) {
                    return 165;
                  }
                  else {
                    return 160;
                  }
                }
              }
              else {
                return 165;
              }
            }
          }
        }
        else {
          if ($lat < 38.929596) {
            if ($lat < 36.997822) {
              if ($lat < 33.736012) {
                if (static::$polygon[710]
                  ->isInside($lat, $lng)) {
                  return 165;
                }
                else {
                  return 160;
                }
              }
              else {
                if ($lng < -86.248566) {
                  return 160;
                }
                else {
                  if ($lat < 35.366917) {
                    if (static::$polygon[711]
                      ->isInside($lat, $lng)) {
                      return 165;
                    }
                    else {
                      return 160;
                    }
                  }
                  else {
                    if ($lng < -85.412205) {
                      return 160;
                    }
                    else {
                      if ($lat < 36.182369) {
                        if (static::$polygon[712]
                          ->isInside($lat, $lng)) {
                          return 165;
                        }
                        else {
                          return 160;
                        }
                      }
                      else {
                        if (static::$polygon[713]
                          ->isInside($lat, $lng)) {
                          return 110;
                        }
                        if (static::$polygon[714]
                          ->isInside($lat, $lng)) {
                          return 160;
                        }
                        else {
                          return 165;
                        }
                      }
                    }
                  }
                }
              }
            }
            else {
              if ($lng < -87.07225800000001) {
                if ($lat < 37.963709) {
                  return 160;
                }
                else {
                  if ($lat < 38.446652) {
                    if (static::$polygon[715]
                      ->isInside($lat, $lng)) {
                      return 54;
                    }
                    if (static::$polygon[716]
                      ->isInside($lat, $lng)) {
                      return 309;
                    }
                    else {
                      return 160;
                    }
                  }
                  else {
                    if (static::$polygon[717]
                      ->isInside($lat, $lng)) {
                      return 54;
                    }
                    if (static::$polygon[718]
                      ->isInside($lat, $lng)) {
                      return 89;
                    }
                    if (static::$polygon[719]
                      ->isInside($lat, $lng)) {
                      return 160;
                    }
                    if (static::$polygon[720]
                      ->isInside($lat, $lng)) {
                      return 160;
                    }
                    else {
                      return 309;
                    }
                  }
                }
              }
              else {
                if ($lng < -85.824051) {
                  if ($lat < 37.963688) {
                    if (static::$polygon[721]
                      ->isInside($lat, $lng)) {
                      return 90;
                    }
                    if (static::$polygon[722]
                      ->isInside($lat, $lng)) {
                      return 130;
                    }
                    if (static::$polygon[723]
                      ->isInside($lat, $lng)) {
                      return 165;
                    }
                    else {
                      return 160;
                    }
                  }
                  else {
                    if ($lng < -86.448154) {
                      if (static::$polygon[724]
                        ->isInside($lat, $lng)) {
                        return 89;
                      }
                      if (static::$polygon[725]
                        ->isInside($lat, $lng)) {
                        return 160;
                      }
                      if (static::$polygon[726]
                        ->isInside($lat, $lng)) {
                        return 160;
                      }
                      if (static::$polygon[727]
                        ->isInside($lat, $lng)) {
                        return 165;
                      }
                      if (static::$polygon[728]
                        ->isInside($lat, $lng)) {
                        return 165;
                      }
                      if (static::$polygon[729]
                        ->isInside($lat, $lng)) {
                        return 309;
                      }
                      if (static::$polygon[730]
                        ->isInside($lat, $lng)) {
                        return 388;
                      }
                      else {
                        return 90;
                      }
                    }
                    else {
                      if ($lat < 38.446592) {
                        if (static::$polygon[731]
                          ->isInside($lat, $lng)) {
                          return 89;
                        }
                        if (static::$polygon[732]
                          ->isInside($lat, $lng)) {
                          return 90;
                        }
                        if (static::$polygon[733]
                          ->isInside($lat, $lng)) {
                          return 130;
                        }
                        if (static::$polygon[734]
                          ->isInside($lat, $lng)) {
                          return 160;
                        }
                        if (static::$polygon[735]
                          ->isInside($lat, $lng)) {
                          return 388;
                        }
                        else {
                          return 165;
                        }
                      }
                      else {
                        if (static::$polygon[736]
                          ->isInside($lat, $lng)) {
                          return 130;
                        }
                        else {
                          return 89;
                        }
                      }
                    }
                  }
                }
                else {
                  if ($lat < 37.963709) {
                    if (static::$polygon[737]
                      ->isInside($lat, $lng)) {
                      return 160;
                    }
                    else {
                      return 165;
                    }
                  }
                  else {
                    if (static::$polygon[738]
                      ->isInside($lat, $lng)) {
                      return 89;
                    }
                    if (static::$polygon[739]
                      ->isInside($lat, $lng)) {
                      return 130;
                    }
                    if (static::$polygon[740]
                      ->isInside($lat, $lng)) {
                      return 391;
                    }
                    else {
                      return 165;
                    }
                  }
                }
              }
            }
          }
          else {
            if ($lng < -86.466347) {
              if ($lat < 41.760455) {
                if (static::$polygon[741]
                  ->isInside($lat, $lng)) {
                  return 89;
                }
                if (static::$polygon[742]
                  ->isInside($lat, $lng)) {
                  return 248;
                }
                if (static::$polygon[743]
                  ->isInside($lat, $lng)) {
                  return 257;
                }
                else {
                  return 160;
                }
              }
              else {
                if ($lng < -87.55037299999999) {
                  return 160;
                }
                else {
                  return 93;
                }
              }
            }
            else {
              if (static::$polygon[744]
                ->isInside($lat, $lng)) {
                return 89;
              }
              if (static::$polygon[745]
                ->isInside($lat, $lng)) {
                return 165;
              }
              else {
                return 93;
              }
            }
          }
        }
      }
      else {
        if ($lat < 41.697075) {
          return 165;
        }
        else {
          if ($lng < -83.173058) {
            if ($lat < 41.733951) {
              if ($lng < -83.44674000000001) {
                if (static::$polygon[746]
                  ->isInside($lat, $lng)) {
                  return 165;
                }
                else {
                  return 93;
                }
              }
              else {
                return 165;
              }
            }
            else {
              return 93;
            }
          }
          else {
            if ($lng < -82.407822) {
              if ($lat < 41.829945) {
                if ($lng < -82.74297300000001) {
                  return 165;
                }
                else {
                  return 238;
                }
              }
              else {
                if (static::$polygon[747]
                  ->isInside($lat, $lng)) {
                  return 238;
                }
                else {
                  return 93;
                }
              }
            }
            else {
              if ($lat < 42.303441) {
                if ($lng < -81.847701) {
                  return 238;
                }
                else {
                  return 165;
                }
              }
              else {
                return 238;
              }
            }
          }
        }
      }
    }
  }
  else {
    if ($lng < -86.50369999999999) {
      if ($lat < 47.860935) {
        if ($lng < -90.43817900000001) {
          return 160;
        }
        else {
          if ($lat < 45.424801) {
            if ($lng < -87.35152100000001) {
              if ($lng < -87.652123) {
                if ($lat < 45.240341) {
                  if (static::$polygon[748]
                    ->isInside($lat, $lng)) {
                    return 94;
                  }
                  if (static::$polygon[749]
                    ->isInside($lat, $lng)) {
                    return 94;
                  }
                  if (static::$polygon[750]
                    ->isInside($lat, $lng)) {
                    return 94;
                  }
                  else {
                    return 160;
                  }
                }
                else {
                  if (static::$polygon[751]
                    ->isInside($lat, $lng)) {
                    return 160;
                  }
                  else {
                    return 94;
                  }
                }
              }
              else {
                if ($lat < 44.970303) {
                  return 160;
                }
                else {
                  if ($lng < -87.580826) {
                    if (static::$polygon[752]
                      ->isInside($lat, $lng)) {
                      return 160;
                    }
                    if (static::$polygon[753]
                      ->isInside($lat, $lng)) {
                      return 160;
                    }
                    else {
                      return 94;
                    }
                  }
                  else {
                    if (static::$polygon[754]
                      ->isInside($lat, $lng)) {
                      return 160;
                    }
                    else {
                      return 94;
                    }
                  }
                }
              }
            }
            else {
              return 160;
            }
          }
          else {
            if ($lng < -87.26763200000001) {
              if ($lat < 46.767605) {
                if ($lng < -88.85290500000001) {
                  if (static::$polygon[755]
                    ->isInside($lat, $lng)) {
                    return 93;
                  }
                  if (static::$polygon[756]
                    ->isInside($lat, $lng)) {
                    return 160;
                  }
                  else {
                    return 94;
                  }
                }
                else {
                  if ($lng < -88.06026799999999) {
                    if (static::$polygon[757]
                      ->isInside($lat, $lng)) {
                      return 93;
                    }
                    if (static::$polygon[758]
                      ->isInside($lat, $lng)) {
                      return 160;
                    }
                    else {
                      return 94;
                    }
                  }
                  else {
                    if (static::$polygon[759]
                      ->isInside($lat, $lng)) {
                      return 93;
                    }
                    if (static::$polygon[760]
                      ->isInside($lat, $lng)) {
                      return 93;
                    }
                    if (static::$polygon[761]
                      ->isInside($lat, $lng)) {
                      return 160;
                    }
                    else {
                      return 94;
                    }
                  }
                }
              }
              else {
                if ($lng < -89.863985) {
                  if ($lat < 46.772694) {
                    return 93;
                  }
                  else {
                    return 160;
                  }
                }
                else {
                  return 93;
                }
              }
            }
            else {
              return 93;
            }
          }
        }
      }
      else {
        if ($lng < -88.182213) {
          if ($lng < -89.0) {
            if ($lat < 48.175171) {
              if ($lng < -89.30744199999999) {
                if ($lng < -89.505821) {
                  if ($lng < -91.087389) {
                    if (static::$polygon[762]
                      ->isInside($lat, $lng)) {
                      return 223;
                    }
                    else {
                      return 160;
                    }
                  }
                  else {
                    if (static::$polygon[763]
                      ->isInside($lat, $lng)) {
                      return 223;
                    }
                    if (static::$polygon[764]
                      ->isInside($lat, $lng)) {
                      return 238;
                    }
                    else {
                      return 160;
                    }
                  }
                }
                else {
                  return 238;
                }
              }
              else {
                if ($lat < 47.993145) {
                  return 93;
                }
                else {
                  return 238;
                }
              }
            }
            else {
              if ($lng < -89.998705) {
                if ($lng < -91.73254300000001) {
                  if ($lat < 48.4641) {
                    if (static::$polygon[765]
                      ->isInside($lat, $lng)) {
                      return 160;
                    }
                    if (static::$polygon[766]
                      ->isInside($lat, $lng)) {
                      return 284;
                    }
                    else {
                      return 223;
                    }
                  }
                  else {
                    if (static::$polygon[767]
                      ->isInside($lat, $lng)) {
                      return 223;
                    }
                    else {
                      return 284;
                    }
                  }
                }
                else {
                  if ($lat < 49.0) {
                    if (static::$polygon[768]
                      ->isInside($lat, $lng)) {
                      return 160;
                    }
                    if (static::$polygon[769]
                      ->isInside($lat, $lng)) {
                      return 238;
                    }
                    else {
                      return 223;
                    }
                  }
                  else {
                    if (static::$polygon[770]
                      ->isInside($lat, $lng)) {
                      return 284;
                    }
                    else {
                      return 238;
                    }
                  }
                }
              }
              else {
                if ($lat < 48.269608) {
                  return 238;
                }
                else {
                  if ($lat < 52.75) {
                    if (static::$polygon[771]
                      ->isInside($lat, $lng)) {
                      return 238;
                    }
                    else {
                      return 358;
                    }
                  }
                  else {
                    return 284;
                  }
                }
              }
            }
          }
          else {
            if ($lng < -88.434196) {
              if ($lat < 48.18502) {
                return 93;
              }
              else {
                return 238;
              }
            }
            else {
              if ($lat < 48.517834) {
                if ($lng < -88.375648) {
                  return 238;
                }
                else {
                  return 93;
                }
              }
              else {
                if ($lat < 48.556038) {
                  return 238;
                }
                else {
                  if (static::$polygon[772]
                    ->isInside($lat, $lng)) {
                    return 335;
                  }
                  else {
                    return 238;
                  }
                }
              }
            }
          }
        }
        else {
          return 238;
        }
      }
    }
    else {
      if ($lng < -81.69579299999999) {
        if ($lng < -83.25221999999999) {
          if ($lat < 45.828533) {
            return 93;
          }
          else {
            if ($lat < 46.770527) {
              if ($lng < -84.597824) {
                if ($lng < -84.706245) {
                  if (static::$polygon[773]
                    ->isInside($lat, $lng)) {
                    return 238;
                  }
                  else {
                    return 93;
                  }
                }
                else {
                  return 93;
                }
              }
              else {
                if ($lng < -84.557343) {
                  if ($lat < 46.441211) {
                    return 93;
                  }
                  else {
                    return 238;
                  }
                }
                else {
                  if ($lng < -84.298393) {
                    if ($lat < 45.987839) {
                      return 93;
                    }
                    else {
                      if (static::$polygon[774]
                        ->isInside($lat, $lng)) {
                        return 238;
                      }
                      else {
                        return 93;
                      }
                    }
                  }
                  else {
                    if (static::$polygon[775]
                      ->isInside($lat, $lng)) {
                      return 238;
                    }
                    else {
                      return 93;
                    }
                  }
                }
              }
            }
            else {
              return 238;
            }
          }
        }
        else {
          if ($lat < 45.048958) {
            if ($lng < -82.802887) {
              return 93;
            }
            else {
              return 238;
            }
          }
          else {
            return 238;
          }
        }
      }
      else {
        if ($lat < 52.532292) {
          return 238;
        }
        else {
          return 137;
        }
      }
    }
  }
}