2

Why is the timezone changed when putting a datetime value into a vector in R? (Using the lubridate package to create the datetime value)

lubridate::now(tz = "UTC")
#> "2018-05-25 20:11:16 UTC"

c(lubridate::now(tz = "UTC"))
#> "2018-05-25 16:11:16 EDT"

(I'm in the Eastern timezone)

David Rubinger
  • 3,580
  • 1
  • 20
  • 29
  • See also `?c.POSIXct` and [c(a, b) for POSIXct objects with tzone attributes?](https://stat.ethz.ch/pipermail/r-help//2012-July/317759.html) – Henrik May 25 '18 at 20:46

0 Answers0