I am trying to convert epoch time to date. I have a numeric array with epoch times.
I tried this -
print(as.POSIXct(x), origin = "1970-01-01", tz = "CST6CDT"))
Where x
represents the numeric array with epoch times
#Output:
" CDT" " CST" " CDT" " CDT" " CDT" " CST" " CDT" " CST"
I have tried these-
print(as.POSIXct(1403878908842, origin = "1970-01-01", tz = "CST6CDT"))
print(as.POSIXct(1403878908842, origin = "1970-01-01", tz = ""))
But they all return timezones not the converted date.