If I have a date like this in London time: \"2009-06-03 19:30\", how can I convert it to the equivalent time in the US West Coast?
Change the tzone attribute of a 'POSIXct' object:
> pb.txt <- "2009-06-03 19:30"
> pb.date <- as.POSIXct(pb.txt, tz="Europe/London")
> attributes(pb.date)$tzone <- "America/Los_Angeles"
> pb.date
[1] "2009-06-03 11:30:00 PDT"
Note that this is still a POSIXct object, tzone has changed, and correct offset has been applied:
> attributes(pb.date)
$class
[1] "POSIXct" "POSIXt"
$tzone
[1] "America/Los_Angeles"