diff --git a/R/raster.R b/R/raster.R index 0d51c303..8a887bea 100644 --- a/R/raster.R +++ b/R/raster.R @@ -357,6 +357,8 @@ st_as_raster = function(x, class, ...) { if (!any(is.na(z))) { if (is.character(z)) { names(b) = z + } else if (inherits(z, c("POSIXt", "Date"))) { + time(b) = z } else { names(b) = paste0(third, z) }