Closed mkoohafkan closed 1 year ago
a POSIX*t object's timezone is lost when it is coerced to a POSIX*t object using as_datetime():
POSIX*t
as_datetime()
x = as.POSIXct("2022-01-01 23:40:36", tz = "US/Pacific") as_datetime(x) ## [1] "2022-01-02 07:40:36 UTC" identical(x, as_datetime(x)) ## [1] FALSE # not the case with as.POSIXct identical(x, as.POSIXct(x)) ## [1] TRUE
Thanks for reporting this!
a
POSIX*t
object's timezone is lost when it is coerced to aPOSIX*t
object usingas_datetime()
: