Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Convert (Gnip) Twitter Date-Time GMT Character to Eastern Standard Time
# from http://stackoverflow.com/questions/4696842/convert-twitter-timestamp-in-r
# assume original field is postedTime
str <- strptime(postedTime, "%Y-%m-%dT%H:%M:%S", tz = "GMT")
dt.gmt <- as.POSIXct(str, tz = "GMT")
postedTime <- format(dt.gmt, tz = "EST", usetz = TRUE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment