Re: [R] time zones and the chron to POSIXct conversion

2012-06-16 Thread Gabor Grothendieck
On Fri, Jun 15, 2012 at 3:25 AM, Jannis wrote: > Hey R folks, > > > i found some strange (to me) behaviour with chron to POSIXct conversion. The > two lines of code result in two different results, on ewith the correct time > zone, one without: > > library(chron) > as.POSIXct(chron('12/12/2000'),

Re: [R] time zones and the chron to POSIXct conversion

2012-06-16 Thread David Winsemius
On Jun 16, 2012, at 1:01 AM, Jeff Newmiller wrote: Why would a date function have a TZ? `as.Date` wouldn't. This statement seems nonsensical to me. POSIXt objects have tzone attributes. I earlier expressed surprise at this statement based on: attributes(as.POSIXct(chron('12/12/2000'),

Re: [R] time zones and the chron to POSIXct conversion

2012-06-16 Thread David Winsemius
On Jun 16, 2012, at 1:01 AM, Jeff Newmiller wrote: Why would a date function have a TZ? `as.Date` wouldn't. This statement seems nonsensical to me. POSIXt objects have tzone attributes. They do? -- David. Date and chron objects do not. Since they do not include tzone, logically the us

Re: [R] time zones and the chron to POSIXct conversion

2012-06-15 Thread R. Michael Weylandt
On Fri, Jun 15, 2012 at 11:26 PM, David Winsemius wrote: > > On Jun 15, 2012, at 11:18 PM, R. Michael Weylandt wrote: > >> It does seem that as.POSIXct.date doesn't respect the tz= argument the >> generic suggests it would. > > > Why would a date function have a TZ? `as.Date` wouldn't. > It seems

Re: [R] time zones and the chron to POSIXct conversion

2012-06-15 Thread Jeff Newmiller
> Why would a date function have > a TZ? `as.Date` wouldn't. This statement seems nonsensical to me. POSIXt objects have tzone attributes. Date and chron objects do not. Since they do not include tzone, logically the user should be able to supply it during a conversion from Date or chron to PO

Re: [R] time zones and the chron to POSIXct conversion

2012-06-15 Thread David Winsemius
On Jun 15, 2012, at 11:18 PM, R. Michael Weylandt wrote: It does seem that as.POSIXct.date doesn't respect the tz= argument the generic suggests it would. Why would a date function have a TZ? `as.Date` wouldn't. I'd think this is a bug that could be changed without breaking back-compatibili

Re: [R] time zones and the chron to POSIXct conversion

2012-06-15 Thread R. Michael Weylandt
It does seem that as.POSIXct.date doesn't respect the tz= argument the generic suggests it would. I'd think this is a bug that could be changed without breaking back-compatibility, but I don't have the power to make such things happen. R-Core ruling? Michael On Fri, Jun 15, 2012 at 2:25 AM, Jann