Thanks. Yes, negative POSIX time would correspond to dates prior to
1970-1-1, or to dates prior to a more recent origin that borrows
functionality from the POSIXt class: as.POSIXct(-.5,
origin=as.POSIXct("2011-1-1")).


>
> If negative POSIX time is supposed to work then it's a bug in as.POSIXlt().
> Now fixed in R-devel (and patched).
>
> Cheers,
> Simon
>
>
> before:
> > str(unclass(as.POSIXlt(as.POSIXct("1970-1-1", tz="UTC")-0.2)))
> List of 9
>  $ sec  : num 0.8
>  $ min  : int 0
>  $ hour : int 0
>  $ mday : int 1
>  $ mon  : int 0
>  $ year : int 70
>  $ wday : int 4
>  $ yday : int 0
>  $ isdst: int 0
>  - attr(*, "tzone")= chr "UTC"
>
> R-devel:
> > str(unclass(as.POSIXlt(as.POSIXct("1970-1-1", tz="UTC")-0.2)))
> List of 9
>  $ sec  : num 59.8
>  $ min  : int 59
>  $ hour : int 23
>  $ mday : int 31
>  $ mon  : int 11
>  $ year : int 69
>  $ wday : int 3
>  $ yday : int 364
>  $ isdst: int 0
>  - attr(*, "tzone")= chr "UTC"
>
>
>
>
> > "R version 2.11.1 (2010-05-31)" on Windows
> > Thanks.
> > Dan Murphy
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
> >
>
>

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to