I'm trying to convert a POSIX object to a string in R by using
as.character(Sys.time()) which returns "2021-09-28 08:38:13"
However, if I just run Sys.time() I get "2021-09-28 08:38:13 CEST".
How do I get the time zone information to be converted to the string, too?
use option usetz = TRUE
as.character(Sys.time(), usetz = TRUE)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With