[R] time zones and the chron to POSIXct conversion

R. Michael Weylandt michael.weylandt at gmail.com
Sat Jun 16 05:18:32 CEST 2012


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, Jannis <bt_jannis at yahoo.de> 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'), tz = 'UTC')
> as.POSIXlt(chron('12/12/2000'), tz = 'UTC')
>
> Only the code below would give me a POSIXct object with the correct time
> zone:
>
> as.POSIXct(as.POSIXlt(chron('12/12/2000'), tz = 'UTC'))
>
>
> Is this a bug or desired behaviour?
>
>
>
> Thanks a lot
> Jannis
>
> ______________________________________________
> R-help at r-project.org 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.



More information about the R-help mailing list