Skip to content
Prev 165347 / 398506 Next

Treatment of Date ODBC objects in R (RODBC)

Ivan Alves wrote:
This is in a sense correct since CET is one hour ahead of GMT (two hours 
in Summer). What is a bit puzzling is that

 > ISOdate(2008,12,24)
[1] "2008-12-24 12:00:00 GMT"
 > class(ISOdate(2008,12,24))
[1] "POSIXt"  "POSIXct"
 > as.POSIXct("2008-12-24")
[1] "2008-12-24 CET"
 > as.POSIXct("2008-12-24")+1
[1] "2008-12-24 00:00:01 CET"

I.e. we have two ways of converting a timeless date to POSIXct, and they 
differ in noon/midnight, and in whether local timezone matters or not.

I believe Brian did this, and he usually does things for a reason....
Add 12 hours, maybe? (43200 seconds)

Or play around with the timezone, but that seems painful.