Giter VIP home page Giter VIP logo

timespace's People

Contributors

emgrasmeder avatar lily-chai avatar tcql avatar tmcw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

timespace's Issues

Missing 53/104/8 tile

The current timezone.json lookup table is missing 53/104/8 tile because turf.intersect between America/Chicago zone and 53/104/8 tile fails with the following error:

unable to assign hole to a shell [ (-105.22637, 30.79939) ]

cc @tcql, @morganherlocker

Incorrect timezone name at Bullhead city, Arizona

@mapbox/timespace version: 2.0.4

browser: Chrome Version 81.0.4044.138 (64-bit)

Link to Demonstration

Open the sandbox example with link below
https://codesandbox.io/s/mapboxtimespace-example-evu15?file=/src/App.js

import React from "react";
import "./styles.css";
import mapTimeZone from "@mapbox/timespace";

const LOCATION = {
  lat: 35.137396,
  lng: -114.525379,
  name: "Bullhead City, Arizona"
};

const getLocationTimeZone = ({ lat, lng }) => {
  const currentTime = Date.now();
  const locationTime = mapTimeZone.getFuzzyLocalTimeFromPoint(currentTime, [
    lng,
    lat
  ]);
  return locationTime.tz();
};

export default function App() {
  return (
    <div className="App">
      <div>Location - {LOCATION.lat}, {LOCATION.lng}</div>
      <div>Place - {LOCATION.name}</div>
      <div>Zone name - {getLocationTimeZone(LOCATION)}</div>
    </div>
  );
}

Expected Behavior

Zone name for this location is expected to be America/Phoenix (MST)

Actual Behavior

Zone name as interpreted by the library is America/Los_Angeles (PDT)

I have verified the timezone at this location lat: 35.137396, lng: -114.525379 with Google Timezone API and various other online sources, which also support the observation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.