Commit 503ab910 authored by Jean-Marie Lepioufle's avatar Jean-Marie Lepioufle
Browse files

typo reletedto time zone

parent 986ce760
......@@ -12,7 +12,10 @@
luftlyr_df_data <- function(x,res){
tmp <- df_data(x=x,ugly_df=res)
tmp$date <- timelyr::convertzone(ts=tmp$date,fromtzone="Europe/Oslo",totzone="UTC")
# convert time zone from Europe/oslo to UTC
x$timeObj$convertTZ("UTC")
tmp$date <- x$timeObj$seqPeriod()
if (x$dateStructObj$COL_DATE) {
# ..
......@@ -21,6 +24,9 @@ luftlyr_df_data <- function(x,res){
} else stop("COL_DATE in the right format")
return(tmp)
}
......
......@@ -17,14 +17,10 @@ luftlyr_get_data <- function(x,username,password) {
tmp_ts <- db$GetAQTimeseries(stationIDs=tmp_st$ST_ID,componentName=x$elementObj$element_id)
if (nrow(tmp_st)>0) {
# from utc to Europe/Oslo time zone
fromDateTime <- timelyr::convertzone(ts=x$timeObj$fromDateTime(),fromtzone="UTC",totzone="Europe/Oslo")
toDateTime <- timelyr::convertzone(ts=x$timeObj$toDateTime(),fromtzone="UTC",totzone="Europe/Oslo")
res <- db$GetAQData(stationIDs=tmp_st$ST_ID,
timeSeriesIDs=tmp_ts$TS_ID,
fromDateTime=as.character(fromDateTime),
toDateTime=as.character(toDateTime))
fromDateTime=as.character(x$timeObj$fromDateTime()+3600), #UTC+1, no summer time
toDateTime=as.character(x$timeObj$toDateTime()+3600)) #UTC+1, no summer time
db$stop()
#Negative values
res[which(res$TE_VALUE<0),"TE_VALUE"]<-NA
......
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