Skip to contents

Make a file path compliant ISO8601 timestamp

Usage

file_timestamp(x = Sys.time(), tzone = "")

Arguments

x

Datetime

tzone

a character string containing the time zone to convert to. R must recognize the name contained in the string as a time zone on your system.

Value

chr of timestamp

Examples

fs::path(paste0("file_", file_timestamp()), ext = "zip")
#> file_2024-05-23T20.22.29.zip