diff --git a/R/ReadNetCDF.R b/R/ReadNetCDF.R index 352a2082..cb976949 100644 --- a/R/ReadNetCDF.R +++ b/R/ReadNetCDF.R @@ -374,7 +374,7 @@ time_units_factor <- c("days" = 24*3600, } - if (!is.null(calendar)) { + if (!is.null(calendar) || length(calendar) == 0) { time <- as.POSIXct(PCICt::as.PCICt(time*time_units_factor[time_unit], cal = calendar, origin = origin), cal = "standard", tz = "UTC", origin = origin) } else {