Commit 6a449051 authored by Dorchies David's avatar Dorchies David
Browse files

fix: date time format change on SGL website

Fix #2
No related merge requests found
Showing with 3 additions and 3 deletions
+3 -3
Package: SGLdataGrabber Package: SGLdataGrabber
Title: Grab available data from EPTB Seine Grands Lacs web site Title: Grab available data from EPTB Seine Grands Lacs web site
Version: 0.1.1 Version: 0.1.2
Authors@R: Authors@R:
person(given = "David", person(given = "David",
family = "Dorchies", family = "Dorchies",
......
...@@ -43,7 +43,7 @@ SGL_GrabVariableListAll <- function( ...@@ -43,7 +43,7 @@ SGL_GrabVariableListAll <- function(
#' #'
#' @param URL Complete URL of the data source. #' @param URL Complete URL of the data source.
#' #'
#' @return A dataframe containing stata time series with 2 columns: `datetime` (Unix timestamp format) and `value`. #' @return A dataframe containing stata time series with 2 columns: `datetime` ([character] format "YYYY-MM-DDThh:mm") and [numeric] `value`.
#' @export #' @export
#' #'
#' @import httr #' @import httr
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#' ) #' )
#' } #' }
thingsboard_UploadTelemetry <- function(URL, dfData) { thingsboard_UploadTelemetry <- function(URL, dfData) {
dfData$datetime <- paste0(format(dfData$datetime), "000") dfData$datetime <- paste0(format(as.numeric(as.POSIXct(dfData$datetime))), "000")
lData <- split(dfData, dfData$datetime) lData <- split(dfData, dfData$datetime)
lapply(X = lData, FUN = thingsboard_UploadTimeStep, URL) lapply(X = lData, FUN = thingsboard_UploadTimeStep, URL)
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment