. , TimeZone. .
POSIXct:
dates <- c("1992-02-27", "1992-02-27", "1992-01-14", "1992-02-28", "1992-01-02")
times <- c("23:03:20", "22:29:56", "01:03:30", "18:21:03", "16:56:26")
X <- paste(dates, times)
str(x)
chr [1:5] "1992-02-27 23:03:20" "1992-02-27 22:29:56" ...
dt <- strptime(x, "%Y-%m-%d %H:%M:%S")
dt
[1] "1992-02-27 23:03:20" "1992-02-27 22:29:56" "1992-01-14 01:03:30"
[4] "1992-02-28 18:21:03" "1992-01-02 16:56:26"
str(dt)
POSIXlt[1:5], format: "1992-02-27 23:03:20" "1992-02-27 22:29:56" ...
:
> now <- Sys.time()
> now
[1] "2014-01-16 16:58:23 IST"
> as.POSIXlt(as.character(now),tz="GMT")
[1] "2014-01-16 17:05:24 GMT"
> str(as.POSIXlt(now))
POSIXlt[1:1], format: "2014-01-16 16:58:23"
> unclass(as.POSIXlt(now))
$sec
[1] 23.1636
$min
[1] 58
$hour
[1] 16
$mday
[1] 16
$mon
[1] 0
$year
[1] 114
$wday
[1] 4
$yday
[1] 15
$isdst
[1] 0
attr(,"tzone")
[1] "" "IST" "IST"