On 6/26/07, Richard M. Heiberger <rmh@temple.edu> wrote:
>
> > I am using RODBC to collect data from an ODBC connection to an MS Access
> > Database.  Everything seems to be working well except datetimes between
> > March 12, 2006 02:00 and 02:59 get moved one hour forward.  This does
> not
> > seem to be happening with Excel connecting to the same
> connection.  March 12
> > seems a bit early for Daylight savings time.  What am I doing wrong?
>
> In 2007, the US moved daylight savings to March 11 instead of the more
> traditional
> first weekend in April.  It continues to November 4, a week later than
> before.
> Google "daylight savings 2007" for lots of background.
>
> Some MS programs did not make the switch until April 1, therefore my
> calendars
> doubled up continuing appointments.
>
> From your experience, it looks like some programs are retroactively
> misapplying
> the change to 2006.



This appears to be a strange interaction between R and Windows.  If I have
windows set to "automatically adjust clock for Daylight Savings changes"
then in R I get the following

> as.POSIXct("2006-03-12 01:05:00 EST5EDT",tz="EST")
[1] "2006-03-12 01:05:00 EST"
> as.POSIXct("2006-03-12 03:05:00 EST5EDT",tz="EST")
[1] "2006-03-12 02:05:00 EST"

If I uncheck the "automatically adjust clock for Daylight Savings" checkbox
I get

> as.POSIXct("2006-03-12 01:05:00 EST5EDT",tz="EST")
[1] "2006-03-12 01:05:00 EST"
> as.POSIXct("2006-03-12 03:05:00 EST5EDT",tz="EST")
[1] "2006-03-12 03:05:00 EST"

All of which makes my head hurt.  At least now I can read the query with
as.is=TRUE  and set the tz explicitly.

	[[alternative HTML version deleted]]

