time <- as.POSIXlt("2021-05-24 21:49:11", tz = "America/New_York",
format = "%Y-%m-%d %H:%M:%OS") # as.POSIXlt.character
is.POSIXlt(time)
class(time) <- append(class(time), "extra_class")
is.POSIXlt(time) # classes other than POSIXlt are allowed
is.POSIXlt(list(time)) # returns FALSE
Run the code above in your browser using DataLab