You are here

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

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

File

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

Class

GeoTimezone
Determine the time zone based on coordinates.

Namespace

Drupal\geotimezone

Code

private static function tryGetTzIndex43($lat, $lng) {
  if ($lng < 113.448914) {
    if ($lng < 108.187553) {
      if ($lng < 107.273552) {
        if ($lat < 20.199528) {
          if ($lat < 18.710368) {
            if ($lat < 12.303858) {
              if (static::$polygon[2381]
                ->isInside($lat, $lng)) {
                return 24;
              }
              else {
                return 251;
              }
            }
            else {
              if ($lat < 16.095304) {
                if ($lat < 14.199581) {
                  if (static::$polygon[2382]
                    ->isInside($lat, $lng)) {
                    return 265;
                  }
                  else {
                    return 251;
                  }
                }
                else {
                  if ($lng < 106.189095) {
                    if ($lat < 15.147442) {
                      if (static::$polygon[2383]
                        ->isInside($lat, $lng)) {
                        return 251;
                      }
                      if (static::$polygon[2384]
                        ->isInside($lat, $lng)) {
                        return 251;
                      }
                      if (static::$polygon[2385]
                        ->isInside($lat, $lng)) {
                        return 270;
                      }
                      else {
                        return 265;
                      }
                    }
                    else {
                      if (static::$polygon[2386]
                        ->isInside($lat, $lng)) {
                        return 270;
                      }
                      else {
                        return 265;
                      }
                    }
                  }
                  else {
                    if (static::$polygon[2387]
                      ->isInside($lat, $lng)) {
                      return 24;
                    }
                    if (static::$polygon[2388]
                      ->isInside($lat, $lng)) {
                      return 251;
                    }
                    else {
                      return 265;
                    }
                  }
                }
              }
              else {
                if ($lat < 17.402836) {
                  if (static::$polygon[2389]
                    ->isInside($lat, $lng)) {
                    return 265;
                  }
                  else {
                    return 24;
                  }
                }
                else {
                  if (static::$polygon[2390]
                    ->isInside($lat, $lng)) {
                    return 265;
                  }
                  else {
                    return 24;
                  }
                }
              }
            }
          }
          else {
            return 24;
          }
        }
        else {
          if ($lat < 21.02389) {
            return 24;
          }
          else {
            if ($lat < 23.203362) {
              if ($lat < 22.113626) {
                if (static::$polygon[2391]
                  ->isInside($lat, $lng)) {
                  return 403;
                }
                else {
                  return 24;
                }
              }
              else {
                if (static::$polygon[2392]
                  ->isInside($lat, $lng)) {
                  return 403;
                }
                else {
                  return 24;
                }
              }
            }
            else {
              if (static::$polygon[2393]
                ->isInside($lat, $lng)) {
                return 24;
              }
              else {
                return 403;
              }
            }
          }
        }
      }
      else {
        if ($lat < 20.977722) {
          if ($lat < 16.122683) {
            if ($lat < 15.68032) {
              if ($lat < 13.628118) {
                if (static::$polygon[2394]
                  ->isInside($lat, $lng)) {
                  return 251;
                }
                else {
                  return 24;
                }
              }
              else {
                if ($lat < 14.654219) {
                  if (static::$polygon[2395]
                    ->isInside($lat, $lng)) {
                    return 24;
                  }
                  if (static::$polygon[2396]
                    ->isInside($lat, $lng)) {
                    return 265;
                  }
                  else {
                    return 251;
                  }
                }
                else {
                  if (static::$polygon[2397]
                    ->isInside($lat, $lng)) {
                    return 251;
                  }
                  if (static::$polygon[2398]
                    ->isInside($lat, $lng)) {
                    return 265;
                  }
                  else {
                    return 24;
                  }
                }
              }
            }
            else {
              if (static::$polygon[2399]
                ->isInside($lat, $lng)) {
                return 265;
              }
              else {
                return 24;
              }
            }
          }
          else {
            return 24;
          }
        }
        else {
          if ($lat < 21.495306) {
            return 24;
          }
          else {
            if ($lng < 108.035889) {
              if (static::$polygon[2400]
                ->isInside($lat, $lng)) {
                return 403;
              }
              else {
                return 24;
              }
            }
            else {
              return 403;
            }
          }
        }
      }
    }
    else {
      if ($lat < 21.252361) {
        if ($lat < 20.156473) {
          if ($lat < 16.223473) {
            return 24;
          }
          else {
            return 403;
          }
        }
        else {
          return 406;
        }
      }
      else {
        if ($lng < 113.043556) {
          if ($lng < 112.198914) {
            if ($lng < 109.072281) {
              return 403;
            }
            else {
              if ($lat < 22.694863) {
                if ($lng < 111.681794) {
                  if ($lng < 111.101901) {
                    if ($lng < 110.087091) {
                      if (static::$polygon[2401]
                        ->isInside($lat, $lng)) {
                        return 406;
                      }
                      else {
                        return 403;
                      }
                    }
                    else {
                      if (static::$polygon[2402]
                        ->isInside($lat, $lng)) {
                        return 403;
                      }
                      else {
                        return 406;
                      }
                    }
                  }
                  else {
                    if ($lat < 21.392139) {
                      return 406;
                    }
                    else {
                      if (static::$polygon[2403]
                        ->isInside($lat, $lng)) {
                        return 406;
                      }
                      else {
                        return 403;
                      }
                    }
                  }
                }
                else {
                  return 403;
                }
              }
              else {
                if ($lat < 23.13945) {
                  if (static::$polygon[2404]
                    ->isInside($lat, $lng)) {
                    return 291;
                  }
                  else {
                    return 403;
                  }
                }
                else {
                  if ($lng < 110.635597) {
                    return 403;
                  }
                  else {
                    if ($lat < 24.261142) {
                      if (static::$polygon[2405]
                        ->isInside($lat, $lng)) {
                        return 291;
                      }
                      if (static::$polygon[2406]
                        ->isInside($lat, $lng)) {
                        return 291;
                      }
                      if (static::$polygon[2407]
                        ->isInside($lat, $lng)) {
                        return 291;
                      }
                      else {
                        return 403;
                      }
                    }
                    else {
                      if (static::$polygon[2408]
                        ->isInside($lat, $lng)) {
                        return 403;
                      }
                      else {
                        return 291;
                      }
                    }
                  }
                }
              }
            }
          }
          else {
            if ($lat < 21.980417) {
              return 403;
            }
            else {
              if ($lat < 23.123449) {
                if (static::$polygon[2409]
                  ->isInside($lat, $lng)) {
                  return 291;
                }
                if (static::$polygon[2410]
                  ->isInside($lat, $lng)) {
                  return 291;
                }
                else {
                  return 403;
                }
              }
              else {
                if ($lat < 23.211371) {
                  if (static::$polygon[2411]
                    ->isInside($lat, $lng)) {
                    return 403;
                  }
                  else {
                    return 291;
                  }
                }
                else {
                  if ($lat < 23.38508) {
                    if (static::$polygon[2412]
                      ->isInside($lat, $lng)) {
                      return 403;
                    }
                    else {
                      return 291;
                    }
                  }
                  else {
                    if (static::$polygon[2413]
                      ->isInside($lat, $lng)) {
                      return 403;
                    }
                    else {
                      return 291;
                    }
                  }
                }
              }
            }
          }
        }
        else {
          return 291;
        }
      }
    }
  }
  else {
    if ($lat < 20.6975) {
      return 279;
    }
    else {
      if ($lng < 114.403358) {
        if ($lng < 113.837753) {
          if ($lat < 22.222334) {
            if ($lng < 113.591026) {
              if ($lng < 113.526558) {
                return 291;
              }
              else {
                if ($lat < 22.137777) {
                  if (static::$polygon[2414]
                    ->isInside($lat, $lng)) {
                    return 291;
                  }
                  else {
                    return 132;
                  }
                }
                else {
                  if ($lat < 22.163389) {
                    if ($lng < 113.54118) {
                      return 132;
                    }
                    else {
                      return 291;
                    }
                  }
                  else {
                    if (static::$polygon[2415]
                      ->isInside($lat, $lng)) {
                      return 291;
                    }
                    else {
                      return 132;
                    }
                  }
                }
              }
            }
            else {
              return 291;
            }
          }
          else {
            return 291;
          }
        }
        else {
          if ($lat < 22.253416) {
            if ($lat < 22.129694) {
              return 291;
            }
            else {
              return 15;
            }
          }
          else {
            if ($lat < 22.374916) {
              return 15;
            }
            else {
              if ($lat < 22.481138) {
                if ($lng < 113.913659) {
                  if ($lat < 22.44274) {
                    return 15;
                  }
                  else {
                    return 291;
                  }
                }
                else {
                  return 15;
                }
              }
              else {
                if (static::$polygon[2416]
                  ->isInside($lat, $lng)) {
                  return 291;
                }
                else {
                  return 15;
                }
              }
            }
          }
        }
      }
      else {
        if ($lng < 119.324997) {
          if ($lng < 117.531754) {
            if ($lat < 20.709833) {
              return 125;
            }
            else {
              return 291;
            }
          }
          else {
            if ($lng < 118.197639) {
              return 291;
            }
            else {
              if ($lat < 24.531528) {
                if ($lng < 118.472969) {
                  return 125;
                }
                else {
                  if ($lat < 23.962) {
                    return 125;
                  }
                  else {
                    return 291;
                  }
                }
              }
              else {
                return 291;
              }
            }
          }
        }
        else {
          if ($lat < 24.179411) {
            return 125;
          }
          else {
            return 291;
          }
        }
      }
    }
  }
}