You are here

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

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

File

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

Class

GeoTimezone
Determine the time zone based on coordinates.

Namespace

Drupal\geotimezone

Code

private static function tryGetTzIndex8($lat, $lng) {
  if ($lng < -118.6782) {
    if ($lat < 48.419193) {
      return 39;
    }
    else {
      if ($lat < 49.00264) {
        if ($lng < -122.902634) {
          if ($lat < 48.722092) {
            if ($lat < 48.429218) {
              return 45;
            }
            else {
              return 39;
            }
          }
          else {
            if ($lng < -123.176979) {
              return 45;
            }
            else {
              if ($lat < 48.820377) {
                if ($lng < -123.040512) {
                  return 45;
                }
                else {
                  return 39;
                }
              }
              else {
                if (static::$polygon[605]
                  ->isInside($lat, $lng)) {
                  return 45;
                }
                else {
                  return 39;
                }
              }
            }
          }
        }
        else {
          if ($lat < 48.744881) {
            return 39;
          }
          else {
            if (static::$polygon[606]
              ->isInside($lat, $lng)) {
              return 45;
            }
            else {
              return 39;
            }
          }
        }
      }
      else {
        return 45;
      }
    }
  }
  else {
    if ($lat < 27.89576) {
      return 407;
    }
    else {
      if ($lat < 29.996002) {
        if ($lng < -114.366554) {
          if ($lat < 27.899921) {
            return 407;
          }
          else {
            return 367;
          }
        }
        else {
          if ($lng < -112.753685) {
            if ($lat < 28.002499) {
              if ($lat < 27.946997) {
                return 407;
              }
              else {
                if (static::$polygon[607]
                  ->isInside($lat, $lng)) {
                  return 367;
                }
                else {
                  return 407;
                }
              }
            }
            else {
              return 367;
            }
          }
          else {
            return 402;
          }
        }
      }
      else {
        if ($lat < 33.478561) {
          if ($lng < -118.299171) {
            return 39;
          }
          else {
            if ($lng < -116.797958) {
              if ($lat < 32.419422) {
                return 194;
              }
              else {
                if (static::$polygon[608]
                  ->isInside($lat, $lng)) {
                  return 194;
                }
                else {
                  return 39;
                }
              }
            }
            else {
              if ($lat < 30.494665) {
                if ($lng < -114.543932) {
                  return 367;
                }
                else {
                  return 402;
                }
              }
              else {
                if ($lng < -113.89933) {
                  if ($lat < 31.986613) {
                    if (static::$polygon[609]
                      ->isInside($lat, $lng)) {
                      return 194;
                    }
                    if (static::$polygon[610]
                      ->isInside($lat, $lng)) {
                      return 402;
                    }
                    else {
                      return 367;
                    }
                  }
                  else {
                    if (static::$polygon[611]
                      ->isInside($lat, $lng)) {
                      return 39;
                    }
                    if (static::$polygon[612]
                      ->isInside($lat, $lng)) {
                      return 194;
                    }
                    if (static::$polygon[613]
                      ->isInside($lat, $lng)) {
                      return 367;
                    }
                    if (static::$polygon[614]
                      ->isInside($lat, $lng)) {
                      return 402;
                    }
                    else {
                      return 9;
                    }
                  }
                }
                else {
                  if (static::$polygon[615]
                    ->isInside($lat, $lng)) {
                    return 9;
                  }
                  else {
                    return 402;
                  }
                }
              }
            }
          }
        }
        else {
          if ($lat < 46.038212) {
            if ($lat < 37.004261) {
              if ($lng < -114.047243) {
                if ($lng < -116.362721) {
                  return 39;
                }
                else {
                  if ($lat < 35.241411) {
                    if (static::$polygon[616]
                      ->isInside($lat, $lng)) {
                      return 9;
                    }
                    else {
                      return 39;
                    }
                  }
                  else {
                    if (static::$polygon[617]
                      ->isInside($lat, $lng)) {
                      return 9;
                    }
                    else {
                      return 39;
                    }
                  }
                }
              }
              else {
                if ($lat < 35.241411) {
                  if (static::$polygon[618]
                    ->isInside($lat, $lng)) {
                    return 273;
                  }
                  else {
                    return 9;
                  }
                }
                else {
                  if ($lng < -112.523972) {
                    return 9;
                  }
                  else {
                    if ($lat < 36.122836) {
                      if (static::$polygon[619]
                        ->isInside($lat, $lng)) {
                        return 9;
                      }
                      if (static::$polygon[620]
                        ->isInside($lat, $lng)) {
                        return 9;
                      }
                      else {
                        return 273;
                      }
                    }
                    else {
                      if (static::$polygon[621]
                        ->isInside($lat, $lng)) {
                        return 9;
                      }
                      if (static::$polygon[622]
                        ->isInside($lat, $lng)) {
                        return 9;
                      }
                      if (static::$polygon[623]
                        ->isInside($lat, $lng)) {
                        return 9;
                      }
                      if (static::$polygon[624]
                        ->isInside($lat, $lng)) {
                        return 9;
                      }
                      else {
                        return 273;
                      }
                    }
                  }
                }
              }
            }
            else {
              if ($lat < 41.521236) {
                if (static::$polygon[625]
                  ->isInside($lat, $lng)) {
                  return 39;
                }
                else {
                  return 273;
                }
              }
              else {
                if ($lng < -114.839451) {
                  if ($lat < 43.779724) {
                    if (static::$polygon[626]
                      ->isInside($lat, $lng)) {
                      return 27;
                    }
                    else {
                      return 39;
                    }
                  }
                  else {
                    if ($lng < -116.758825) {
                      if (static::$polygon[627]
                        ->isInside($lat, $lng)) {
                        return 27;
                      }
                      if (static::$polygon[628]
                        ->isInside($lat, $lng)) {
                        return 27;
                      }
                      else {
                        return 39;
                      }
                    }
                    else {
                      if (static::$polygon[629]
                        ->isInside($lat, $lng)) {
                        return 27;
                      }
                      else {
                        return 39;
                      }
                    }
                  }
                }
                else {
                  if ($lat < 43.779724) {
                    if (static::$polygon[630]
                      ->isInside($lat, $lng)) {
                      return 27;
                    }
                    if (static::$polygon[631]
                      ->isInside($lat, $lng)) {
                      return 39;
                    }
                    else {
                      return 273;
                    }
                  }
                  else {
                    if ($lng < -112.920076) {
                      if ($lat < 44.908968) {
                        if (static::$polygon[632]
                          ->isInside($lat, $lng)) {
                          return 273;
                        }
                        else {
                          return 27;
                        }
                      }
                      else {
                        if ($lng < -113.879764) {
                          if (static::$polygon[633]
                            ->isInside($lat, $lng)) {
                            return 27;
                          }
                          if (static::$polygon[634]
                            ->isInside($lat, $lng)) {
                            return 39;
                          }
                          else {
                            return 273;
                          }
                        }
                        else {
                          if (static::$polygon[635]
                            ->isInside($lat, $lng)) {
                            return 27;
                          }
                          else {
                            return 273;
                          }
                        }
                      }
                    }
                    else {
                      if (static::$polygon[636]
                        ->isInside($lat, $lng)) {
                        return 27;
                      }
                      else {
                        return 273;
                      }
                    }
                  }
                }
              }
            }
          }
          else {
            if ($lat < 52.1503) {
              if ($lng < -114.839451) {
                if ($lat < 49.094256) {
                  if (static::$polygon[637]
                    ->isInside($lat, $lng)) {
                    return 45;
                  }
                  if (static::$polygon[638]
                    ->isInside($lat, $lng)) {
                    return 227;
                  }
                  if (static::$polygon[639]
                    ->isInside($lat, $lng)) {
                    return 253;
                  }
                  if (static::$polygon[640]
                    ->isInside($lat, $lng)) {
                    return 273;
                  }
                  else {
                    return 39;
                  }
                }
                else {
                  if ($lng < -116.758825) {
                    if ($lat < 50.622278) {
                      if (static::$polygon[641]
                        ->isInside($lat, $lng)) {
                        return 253;
                      }
                      if (static::$polygon[642]
                        ->isInside($lat, $lng)) {
                        return 253;
                      }
                      else {
                        return 45;
                      }
                    }
                    else {
                      if (static::$polygon[643]
                        ->isInside($lat, $lng)) {
                        return 227;
                      }
                      else {
                        return 45;
                      }
                    }
                  }
                  else {
                    if ($lat < 50.622278) {
                      if ($lng < -115.799138) {
                        if ($lat < 49.858267) {
                          if (static::$polygon[644]
                            ->isInside($lat, $lng)) {
                            return 45;
                          }
                          if (static::$polygon[645]
                            ->isInside($lat, $lng)) {
                            return 45;
                          }
                          if (static::$polygon[646]
                            ->isInside($lat, $lng)) {
                            return 227;
                          }
                          else {
                            return 253;
                          }
                        }
                        else {
                          if (static::$polygon[647]
                            ->isInside($lat, $lng)) {
                            return 227;
                          }
                          else {
                            return 45;
                          }
                        }
                      }
                      else {
                        return 227;
                      }
                    }
                    else {
                      if (static::$polygon[648]
                        ->isInside($lat, $lng)) {
                        return 45;
                      }
                      else {
                        return 227;
                      }
                    }
                  }
                }
              }
              else {
                if (static::$polygon[649]
                  ->isInside($lat, $lng)) {
                  return 39;
                }
                if (static::$polygon[650]
                  ->isInside($lat, $lng)) {
                  return 227;
                }
                else {
                  return 273;
                }
              }
            }
            else {
              if (static::$polygon[651]
                ->isInside($lat, $lng)) {
                return 45;
              }
              else {
                return 227;
              }
            }
          }
        }
      }
    }
  }
}