dimfalk / netatmo.weather

R wrapper for Netatmo Weather API
GNU General Public License v3.0
3 stars 0 forks source link

`get_period()`: use consistent timezone information #62

Closed dimfalk closed 7 months ago

dimfalk commented 7 months ago
library(netatmo.weather)
#> 0.5.2

p <- get_period(c("2024-01-01", "2024-01-15"))
as.POSIXct(p, origin = "1970-01-01", tz = "UTC")
#> "2023-12-31 23:00:00 UTC" "2024-01-14 23:00:00 UTC"

obs <- get_measure(devices = stations[1, ], 
                   period = p, 
                   par = "temperature", 
                   res = 5)

zoo::index(obs[[1]]) |> range()
#> "2023-12-31 23:00:00 UTC" "2024-01-04 14:25:00 UTC"
dimfalk commented 7 months ago
library(netatmo.weather)
#> 0.5.3

p <- get_period(c("2024-01-01", "2024-01-15"))
as.POSIXct(p, origin = "1970-01-01")
#> "2024-01-01 CET" "2024-01-15 CET"

obs <- get_measure(devices = stations[1, ], 
                   period = p, 
                   par = "temperature", 
                   res = 5)

zoo::index(obs[[1]]) |> range()
#> "2024-01-01 00:00:00 CET" "2024-01-04 15:25:00 CET"