Skip to content

Instantly share code, notes, and snippets.

@wesslen
Created July 11, 2016 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wesslen/a659cc0548f7f0af6d143e2269061f66 to your computer and use it in GitHub Desktop.
Save wesslen/a659cc0548f7f0af6d143e2269061f66 to your computer and use it in GitHub Desktop.
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