GithubHelp home page GithubHelp logo

Comments (6)

jpmens avatar jpmens commented on August 17, 2024

not specifically, but. you might be able to use os.date.

from recorder.

centralhardware avatar centralhardware commented on August 17, 2024

the problem is that the device that transmits the coordinates may be in a time zone that is different from the server’s time zone

from recorder.

centralhardware avatar centralhardware commented on August 17, 2024

For now i am identify timezone by reverse geocoding but if i can receive timezone directly from device it made everything easier

from recorder.

jpmens avatar jpmens commented on August 17, 2024

You raise a very valid point.

When using our Recorder as backend, we perform reverse geo lookups (if so configured), and store country code alongside the address in the LMDB database:

$ ocat —dump | grep …

u0fxp88 {"cc":"BE","addr":"Autoroute de Wallonie, 7390 Mons, Belgium","tst":1660297060,"locality":"Mons"}

This data is surfaced via the API:

curl http://192.168.1.30:8083/api/0/locations -d
 user=jp -d device=5s -d from=2022-08-12T06:50 -d format=json | jq .

{
  "_type": "location",
  "acc": 5,
  "lat": 50.453064,
  "lon": 3.845614,
  "tid": "jp",
  "tst": 1660297031,
  "vac": 3,  "vel": 116,
  "ghash": "u0fxp88",
  "cc": "BE",
  "addr": "Autoroute de Wallonie, 7390 Mons, Belgium",
  "locality": "Mons",
  "isorcv": "2022-08-12T09:37:11Z",
  "isotst": "2022-08-12T09:37:11Z",
  "disptst": "2022-08-12 09:37:11"
}

and, finally, that contains a country code (cc).

It’s not exactly what you want, but might be a bit of help. However, we’d need to take tst into consideration to determine whether daylight savings was in effect, etc.

What a mess. ;)

from recorder.

jpmens avatar jpmens commented on August 17, 2024

We've been talking about this. The tst is definitely in UTC. As @ckrey points out it is possible to lookup $TZ using one of a large number of languages / services

from recorder.

centralhardware avatar centralhardware commented on August 17, 2024

Solved by #444 Many thanks to the participants for their useful help

from recorder.

Related Issues (20)

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.