Giter VIP home page Giter VIP logo

Comments (1)

munterfi avatar munterfi commented on August 16, 2024

Timezone and time are now correct:

library(sf)
#> Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1
library(hereR)

# Timestamp with different timezone as my local CET
(datetime = as.POSIXct("2020-12-17 08:00:00", tz = "Europe/Moscow"))
#> [1] "2020-12-17 08:00:00 MSK"

connection(poi[1, ], poi[2, ], datetime = datetime)$departure[1]
#> Sending 1 request(s) to: 'https://transit.router.hereapi.com/v8/routes?...'
#> Received 1 response(s) with total size: 118.7 Kb
#> [1] "2020-12-17 08:53:00 MSK"

intermodal_route(poi[1, ], poi[2, ], datetime = datetime)$departure[1]
#> Sending 1 request(s) to: 'https://intermodal.router.hereapi.com/v8/routes?...'
#> Received 1 response(s) with total size: 59.5 Kb
#> [1] "2020-12-17 08:53:00 MSK"

route(poi[1, ], poi[2, ], datetime = datetime)$departure[1]
#> Sending 1 request(s) to: 'https://route.ls.hereapi.com/routing/7.2/calculateroute.json?...'
#> Received 1 response(s) with total size: 49.9 Kb
#> [1] "2020-12-17 08:00:00 MSK"

route_matrix(poi[1, ], poi[2, ], datetime = datetime)$departure[1]
#> Sending 1 request(s) to: 'https://matrix.route.ls.hereapi.com/routing/7.2/calculatematrix.json?...'
#> Received 1 response(s) with total size: 712 bytes
#> [1] "2020-12-17 08:00:00 MSK"

isoline(poi[1, ], datetime = datetime)$departure[1]
#> Sending 1 request(s) to: 'https://isoline.router.hereapi.com/v8/isolines?...'
#> Received 1 response(s) with total size: 9.7 Kb
#> [1] "2020-12-17 08:00:00 MSK"

# Timestamp with my local timezone (CET)
(datetime = as.POSIXct("2020-12-17 08:00:00", tz = "Europe/Zurich"))
#> [1] "2020-12-17 08:00:00 CET"

connection(poi[1, ], poi[2, ], datetime = datetime)$departure[1]
#> Sending 1 request(s) to: 'https://transit.router.hereapi.com/v8/routes?...'
#> Received 1 response(s) with total size: 119.8 Kb
#> [1] "2020-12-17 08:49:00 CET"

intermodal_route(poi[1, ], poi[2, ], datetime = datetime)$departure[1]
#> Sending 1 request(s) to: 'https://intermodal.router.hereapi.com/v8/routes?...'
#> Received 1 response(s) with total size: 74.1 Kb
#> [1] "2020-12-17 08:49:00 CET"

route(poi[1, ], poi[2, ], datetime = datetime)$departure[1]
#> Sending 1 request(s) to: 'https://route.ls.hereapi.com/routing/7.2/calculateroute.json?...'
#> Received 1 response(s) with total size: 49.9 Kb
#> [1] "2020-12-17 08:00:00 CET"

route_matrix(poi[1, ], poi[2, ], datetime = datetime)$departure[1]
#> Sending 1 request(s) to: 'https://matrix.route.ls.hereapi.com/routing/7.2/calculatematrix.json?...'
#> Received 1 response(s) with total size: 712 bytes
#> [1] "2020-12-17 08:00:00 CET"

isoline(poi[1, ], datetime = datetime)$departure[1]
#> Sending 1 request(s) to: 'https://isoline.router.hereapi.com/v8/isolines?...'
#> Received 1 response(s) with total size: 8.6 Kb
#> [1] "2020-12-17 08:00:00 CET"

from herer.

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.