Skip to content

Commit

Permalink
extra format step not needed, another fix for timestep="Hourly"
Browse files Browse the repository at this point in the history
  • Loading branch information
brownag committed Sep 18, 2024
1 parent aa80dfb commit d96cf6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/fetchSCAN.R
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ fetchSCAN <- function(site.code = NULL, year = NULL, report = 'SCAN', timeseries

# Time ranges from "00:00" to "23:00" [24 hourly readings]
# set Time to 12:00 (middle of day) for daily data
if(!hourlyFlag) {
if (!hourlyFlag) {
# only when there are data
if (nrow(res) > 0) {
res$Time <- "12:00"
Expand All @@ -331,7 +331,7 @@ fetchSCAN <- function(site.code = NULL, year = NULL, report = 'SCAN', timeseries
.so <- formatC(meta$dataTimeZone * 100, 4, flag = 0)

# create datetime stamp standardized to user-specified timezone
res$datetime <- as.POSIXct(strptime(paste(res$Date, res$Time, .so), "%Y-%m-%d %H:%M %z"),
res$datetime <- as.POSIXct(paste(res$Date, res$Time, .so),
format = "%Y-%m-%d %H:%M %z",
tz = tz)

Expand Down

0 comments on commit d96cf6f

Please sign in to comment.