I am trying to output the system date and time to a text file. When I do this, the time zone will disappear. The following is an example:
> Sys.time()
[1] "2012-05-24 09:58:38 CDT"
> currentTime <- Sys.time()
> currentTime
[1] "2012-05-24 09:58:49 CDT"
> cat(as.character(currentTime), sep = "\n")
2012-05-24 09:58:49
What happened to the time zone and how to get it back?
Jdub source
share