From a588913f1b334c9590f8b28fe279284e53bf3de5 Mon Sep 17 00:00:00 2001 From: edzer Date: Wed, 9 Oct 2024 19:06:40 +0200 Subject: [PATCH] fixes #717 --- R/raster.R | 2 ++ 1 file changed, 2 insertions(+) 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) }