You are here

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

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

File

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

Class

GeoTimezone
Determine the time zone based on coordinates.

Namespace

Drupal\geotimezone

Code

private static function tryGetTzIndex1($lat, $lng) {
  if ($lng < -82.73828899999999) {
    if ($lat < 14.445067) {
      if ($lat < 0.165531) {
        if ($lng < -124.77285) {
          if ($lng < -136.16217) {
            if ($lat < -21.293276) {
              return 305;
            }
            else {
              return 312;
            }
          }
          else {
            if ($lng < -134.878342) {
              return 305;
            }
            else {
              return 107;
            }
          }
        }
        else {
          return 114;
        }
      }
      else {
        if ($lat < 12.177296) {
          if ($lat < 8.949529) {
            if ($lng < -89.933998) {
              return 114;
            }
            else {
              if ($lng < -83.620537) {
                return 396;
              }
              else {
                if (static::$polygon[117]
                  ->isInside($lat, $lng)) {
                  return 22;
                }
                else {
                  return 396;
                }
              }
            }
          }
          else {
            if ($lat < 9.948153) {
              if ($lng < -83.62190200000001) {
                return 396;
              }
              else {
                if (static::$polygon[118]
                  ->isInside($lat, $lng)) {
                  return 22;
                }
                else {
                  return 396;
                }
              }
            }
            else {
              if ($lat < 10.11906) {
                return 396;
              }
              else {
                if ($lng < -83.202422) {
                  if ($lat < 10.124827) {
                    return 396;
                  }
                  else {
                    if (static::$polygon[119]
                      ->isInside($lat, $lng)) {
                      return 259;
                    }
                    else {
                      return 396;
                    }
                  }
                }
                else {
                  return 259;
                }
              }
            }
          }
        }
        else {
          if ($lng < -87.692162) {
            if ($lat < 13.31246) {
              return 258;
            }
            else {
              if ($lng < -89.350505) {
                if ($lng < -90.279968) {
                  return 392;
                }
                else {
                  if (static::$polygon[120]
                    ->isInside($lat, $lng)) {
                    return 392;
                  }
                  else {
                    return 258;
                  }
                }
              }
              else {
                if (static::$polygon[121]
                  ->isInside($lat, $lng)) {
                  return 258;
                }
                if (static::$polygon[122]
                  ->isInside($lat, $lng)) {
                  return 258;
                }
                if (static::$polygon[123]
                  ->isInside($lat, $lng)) {
                  return 258;
                }
                else {
                  return 145;
                }
              }
            }
          }
          else {
            if ($lng < -85.15791299999999) {
              if ($lng < -87.547157) {
                if ($lat < 13.082987) {
                  return 259;
                }
                else {
                  return 145;
                }
              }
              else {
                if ($lat < 12.833526) {
                  return 259;
                }
                else {
                  if ($lat < 14.293488) {
                    if ($lat < 13.315682) {
                      if (static::$polygon[124]
                        ->isInside($lat, $lng)) {
                        return 259;
                      }
                      else {
                        return 145;
                      }
                    }
                    else {
                      if ($lng < -87.386246) {
                        return 145;
                      }
                      else {
                        if (static::$polygon[125]
                          ->isInside($lat, $lng)) {
                          return 259;
                        }
                        else {
                          return 145;
                        }
                      }
                    }
                  }
                  else {
                    if (static::$polygon[126]
                      ->isInside($lat, $lng)) {
                      return 259;
                    }
                    else {
                      return 145;
                    }
                  }
                }
              }
            }
            else {
              return 259;
            }
          }
        }
      }
    }
    else {
      if ($lat < 17.8174) {
        if ($lng < -88.033722) {
          if ($lng < -88.175591) {
            if ($lng < -92.93701900000001) {
              return 192;
            }
            else {
              if ($lng < -90.371544) {
                if ($lat < 16.131234) {
                  if (static::$polygon[127]
                    ->isInside($lat, $lng)) {
                    return 192;
                  }
                  else {
                    return 392;
                  }
                }
                else {
                  if ($lng < -91.65428199999999) {
                    return 192;
                  }
                  else {
                    if ($lat < 16.974317) {
                      if (static::$polygon[128]
                        ->isInside($lat, $lng)) {
                        return 392;
                      }
                      else {
                        return 192;
                      }
                    }
                    else {
                      if (static::$polygon[129]
                        ->isInside($lat, $lng)) {
                        return 392;
                      }
                      else {
                        return 192;
                      }
                    }
                  }
                }
              }
              else {
                if ($lat < 15.718479) {
                  if (static::$polygon[130]
                    ->isInside($lat, $lng)) {
                    return 145;
                  }
                  else {
                    return 392;
                  }
                }
                else {
                  if ($lng < -88.627838) {
                    if (static::$polygon[131]
                      ->isInside($lat, $lng)) {
                      return 392;
                    }
                    else {
                      return 41;
                    }
                  }
                  else {
                    if ($lat < 16.102887) {
                      return 41;
                    }
                    else {
                      return 392;
                    }
                  }
                }
              }
            }
          }
          else {
            if ($lat < 15.784808) {
              return 145;
            }
            else {
              return 41;
            }
          }
        }
        else {
          if ($lat < 16.510256) {
            if ($lng < -85.842651) {
              return 145;
            }
            else {
              if ($lng < -84.498272) {
                if (static::$polygon[132]
                  ->isInside($lat, $lng)) {
                  return 259;
                }
                else {
                  return 145;
                }
              }
              else {
                if (static::$polygon[133]
                  ->isInside($lat, $lng)) {
                  return 145;
                }
                else {
                  return 259;
                }
              }
            }
          }
          else {
            if ($lng < -87.468124) {
              return 41;
            }
            else {
              return 145;
            }
          }
        }
      }
      else {
        if ($lng < -87.849937) {
          if ($lng < -90.983063) {
            if ($lng < -110.80706) {
              return 407;
            }
            else {
              if ($lng < -96.04898799999999) {
                return 192;
              }
              else {
                if ($lng < -91.50955999999999) {
                  if (static::$polygon[134]
                    ->isInside($lat, $lng)) {
                    return 32;
                  }
                  if (static::$polygon[135]
                    ->isInside($lat, $lng)) {
                    return 32;
                  }
                  else {
                    return 192;
                  }
                }
                else {
                  if ($lat < 18.103054) {
                    if (static::$polygon[136]
                      ->isInside($lat, $lng)) {
                      return 192;
                    }
                    else {
                      return 32;
                    }
                  }
                  else {
                    return 32;
                  }
                }
              }
            }
          }
          else {
            if ($lng < -88.067238) {
              if ($lng < -88.080856) {
                if (static::$polygon[137]
                  ->isInside($lat, $lng)) {
                  return 32;
                }
                if (static::$polygon[138]
                  ->isInside($lat, $lng)) {
                  return 41;
                }
                else {
                  return 401;
                }
              }
              else {
                return 401;
              }
            }
            else {
              if ($lat < 18.167719) {
                return 41;
              }
              else {
                return 401;
              }
            }
          }
        }
        else {
          return 401;
        }
      }
    }
  }
  else {
    if ($lat < 7.644825) {
      if ($lat < 1.841667) {
        if ($lng < -79.895477) {
          if ($lat < -3.404815) {
            if ($lng < -80.83873) {
              return 164;
            }
            else {
              if ($lng < -80.23094500000001) {
                if ($lat < -3.453752) {
                  if ($lat < -3.949543) {
                    if (static::$polygon[139]
                      ->isInside($lat, $lng)) {
                      return 381;
                    }
                    else {
                      return 164;
                    }
                  }
                  else {
                    if (static::$polygon[140]
                      ->isInside($lat, $lng)) {
                      return 381;
                    }
                    else {
                      return 164;
                    }
                  }
                }
                else {
                  if (static::$polygon[141]
                    ->isInside($lat, $lng)) {
                    return 164;
                  }
                  else {
                    return 381;
                  }
                }
              }
              else {
                if ($lat < -3.437323) {
                  if ($lat < -4.285207) {
                    if ($lng < -80.136307) {
                      if (static::$polygon[142]
                        ->isInside($lat, $lng)) {
                        return 381;
                      }
                      else {
                        return 164;
                      }
                    }
                    else {
                      if (static::$polygon[143]
                        ->isInside($lat, $lng)) {
                        return 381;
                      }
                      else {
                        return 164;
                      }
                    }
                  }
                  else {
                    if ($lat < -3.478404) {
                      if (static::$polygon[144]
                        ->isInside($lat, $lng)) {
                        return 164;
                      }
                      else {
                        return 381;
                      }
                    }
                    else {
                      if (static::$polygon[145]
                        ->isInside($lat, $lng)) {
                        return 164;
                      }
                      else {
                        return 381;
                      }
                    }
                  }
                }
                else {
                  return 381;
                }
              }
            }
          }
          else {
            return 381;
          }
        }
        else {
          if ($lat < -9.017232) {
            return 164;
          }
          else {
            if ($lat < 1.43902) {
              if ($lng < -79.723465) {
                if ($lat < -4.393893) {
                  if (static::$polygon[146]
                    ->isInside($lat, $lng)) {
                    return 381;
                  }
                  else {
                    return 164;
                  }
                }
                else {
                  return 381;
                }
              }
              else {
                if ($lat < -3.789106) {
                  if (static::$polygon[147]
                    ->isInside($lat, $lng)) {
                    return 381;
                  }
                  else {
                    return 164;
                  }
                }
                else {
                  if ($lng < -77.10102500000001) {
                    if (static::$polygon[148]
                      ->isInside($lat, $lng)) {
                      return 164;
                    }
                    if (static::$polygon[149]
                      ->isInside($lat, $lng)) {
                      return 390;
                    }
                    else {
                      return 381;
                    }
                  }
                  else {
                    if ($lat < -1.175043) {
                      if (static::$polygon[150]
                        ->isInside($lat, $lng)) {
                        return 381;
                      }
                      else {
                        return 164;
                      }
                    }
                    else {
                      if ($lng < -75.789804) {
                        if (static::$polygon[151]
                          ->isInside($lat, $lng)) {
                          return 390;
                        }
                        else {
                          return 381;
                        }
                      }
                      else {
                        if ($lat < 0.131988) {
                          if ($lng < -75.13419399999999) {
                            if (static::$polygon[152]
                              ->isInside($lat, $lng)) {
                              return 164;
                            }
                            if (static::$polygon[153]
                              ->isInside($lat, $lng)) {
                              return 390;
                            }
                            else {
                              return 381;
                            }
                          }
                          else {
                            if (static::$polygon[154]
                              ->isInside($lat, $lng)) {
                              return 390;
                            }
                            else {
                              return 164;
                            }
                          }
                        }
                        else {
                          return 390;
                        }
                      }
                    }
                  }
                }
              }
            }
            else {
              return 390;
            }
          }
        }
      }
      else {
        if ($lat < 7.110721) {
          return 390;
        }
        else {
          if ($lng < -79.995277) {
            return 22;
          }
          else {
            if ($lng < -77.718857) {
              if ($lat < 7.508337) {
                if (static::$polygon[155]
                  ->isInside($lat, $lng)) {
                  return 390;
                }
                else {
                  return 22;
                }
              }
              else {
                if (static::$polygon[156]
                  ->isInside($lat, $lng)) {
                  return 390;
                }
                else {
                  return 22;
                }
              }
            }
            else {
              if (static::$polygon[157]
                ->isInside($lat, $lng)) {
                return 22;
              }
              else {
                return 390;
              }
            }
          }
        }
      }
    }
    else {
      if ($lng < -79.893906) {
        if ($lat < 8.331585) {
          return 22;
        }
        else {
          if ($lng < -82.23181200000001) {
            if ($lng < -82.555992) {
              if ($lat < 9.648607999999999) {
                if ($lat < 8.973390999999999) {
                  if (static::$polygon[158]
                    ->isInside($lat, $lng)) {
                    return 396;
                  }
                  else {
                    return 22;
                  }
                }
                else {
                  if (static::$polygon[159]
                    ->isInside($lat, $lng)) {
                    return 396;
                  }
                  else {
                    return 22;
                  }
                }
              }
              else {
                return 259;
              }
            }
            else {
              return 22;
            }
          }
          else {
            if ($lat < 9.380544) {
              return 22;
            }
            else {
              if ($lat < 13.380502) {
                return 390;
              }
              else {
                return 221;
              }
            }
          }
        }
      }
      else {
        if ($lng < -78.793159) {
          if ($lat < 9.637513999999999) {
            return 22;
          }
          else {
            return 221;
          }
        }
        else {
          if ($lat < 11.112972) {
            if ($lng < -77.17411) {
              if ($lng < -78.151619) {
                return 22;
              }
              else {
                if ($lat < 8.686544) {
                  if ($lng < -77.659527) {
                    if (static::$polygon[160]
                      ->isInside($lat, $lng)) {
                      return 390;
                    }
                    else {
                      return 22;
                    }
                  }
                  else {
                    if (static::$polygon[161]
                      ->isInside($lat, $lng)) {
                      return 22;
                    }
                    else {
                      return 390;
                    }
                  }
                }
                else {
                  return 22;
                }
              }
            }
            else {
              return 390;
            }
          }
          else {
            if ($lat < 18.526976) {
              return 72;
            }
            else {
              if ($lng < -77.16213999999999) {
                return 376;
              }
              else {
                if (static::$polygon[162]
                  ->isInside($lat, $lng)) {
                  return 165;
                }
                if (static::$polygon[163]
                  ->isInside($lat, $lng)) {
                  return 165;
                }
                else {
                  return 376;
                }
              }
            }
          }
        }
      }
    }
  }
}