[R] Doing things with POSIXt
Dirk Eddelbuettel
edd at debian.org
Tue Nov 27 04:22:11 CET 2001
"Vadim" == Vadim Ogranovich <vograno at arbitrade.com> writes:
Vadim> The catch is that the daytime of "1992-01-14 01:03:30 PST" is
Vadim> 1.058333 and not 7.058333 as your system produces. On my system it
Vadim> is 9.058333 hours, which makes me think it has something to do with
Vadim> time zones.
> datetime <- as.POSIXct("1992-01-14 01:03:30 PST", tz="PST")
> as.numeric(difftime(datetime, midnight, "hours"))
[1] 1.058333
Dirk
--
Better to have an approximate answer to the right question
than a precise answer to the wrong question. -- John Tukey
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list