On Fri, 27 Oct 2006 14:55:15 -0400,
"Gabor Grothendieck" <[EMAIL PROTECTED]> wrote:
> Try this: gmtDiff <- function(time) time - as.POSIXct(format(time), tz =
> "GMT")
> gmtDiff(Sys.time()) gmtDiff(as.POSIXct("2006-10-27", tz = "GMT"))
> which both give me the correct answer currently.
> The expression after the minus sign comes from the table at the end of
> the help desk article in R News 4/1. I think you got the parentheses
> wrong in your version and I think the isdst calculation needs to be
> omitted -- I get the right answer if I leave it out but wrong with it.
Thanks Gabor, this provides the correct result, and the isdst calculation
is no longer needed.
Cheers,
--
Seb
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.