Skip to content

Commit 3a9431c

Browse files
authored
Update utils-upload - ":" doesn't work in windows
1 parent 1cc9f53 commit 3a9431c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/utils-upload.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ ee_as_proxystars <- function(x, temp_dir = tempdir()) {
364364
if (is.character(x)) {
365365
stars::read_stars(x, proxy = TRUE)
366366
} else if (is(x,"stars")) {
367-
time_format <- format(Sys.time(), "%Y-%m-%d-%H:%M:%S")
367+
time_format <- format(Sys.time(), "%Y-%m-%d-%H%M%S")
368368
ee_description <- paste0("ee_as_stars_task_", time_format)
369369
tiff_filename <- sprintf("%s/%s.tif", temp_dir, ee_description)
370370
stars::write_stars(x, tiff_filename)
@@ -373,7 +373,7 @@ ee_as_proxystars <- function(x, temp_dir = tempdir()) {
373373
if (!requireNamespace("raster", quietly = TRUE)) {
374374
stop("package raster required, please install it first")
375375
}
376-
time_format <- format(Sys.time(), "%Y-%m-%d-%H:%M:%S")
376+
time_format <- format(Sys.time(), "%Y-%m-%d-%H%M%S")
377377
ee_description <- paste0("ee_as_stars_task_", time_format)
378378
tiff_filename <- sprintf("%s/%s.tif", temp_dir, ee_description)
379379
raster::writeRaster(x, tiff_filename)

0 commit comments

Comments
 (0)