I am trying to convert a 13 character UNIX timestamp to datetime and I am getting a year that is in the 44000's. I'm not sure what I am doing wrong, hopefully someone can help.
library(maptools)
GMT <- readShapePoints("~/Documents/Data/Cyber/US/CONTIG_US/UNF01_CONT")
GMT1 <- as.POSIXct(as.numeric(as.character(GMT$Encoded_Ti)),origin='01-01-1970', tz = 'GMT')
Y <- sample(GMT1, 10, replace = FALSE)
print(Y)
I am grabbing a random sample just to show the results because my file contains 100K+ points. The results I get are as follows:
[1] "44086-01-29 06:33:40 GMT" "44071-01-06 17:21:10 GMT"
[3] "44058-02-21 04:30:10 GMT" "44065-10-06 14:21:40 GMT"
[5] "44061-07-25 17:34:40 GMT" "44038-03-28 21:28:10 GMT"
[7] "44047-07-02 14:27:00 GMT" "44090-04-01 22:37:20 GMT"
[9] "44040-02-16 12:33:40 GMT" "44068-10-08 14:17:20 GMT"
Does anybody have any ideas as to what I am doing wrong?