[R-SIG-Mac] POSIXct and chron error

Paul Ossenbruggen pjo at cisunix.unh.edu
Tue Sep 23 23:09:13 CEST 2014


Why does the following incorrectly subtract 4 hours from times = “20:00:00”?

> date = "03/31/10"
> times = "20:00:00"
> as.POSIXct(chron(date, times, format=c(dates="M/D/Y", times="hh:mm:ss")))
[1] "2010-03-31 16:00:00 EDT”

Thanks,

Paul


	[[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list