Re: [Rd] Conversion and rounding of POSIXct

2009-03-15 Thread Stavros Macrakis
On Sun, Mar 15, 2009 at 1:04 PM, Dirk Eddelbuettel wrote: Dirk, Thanks for your reply. > a) you need to enable sub-second print formats Yes, if I want to display sub-second printing. But I was just looking at the rounding behavior. > b) AFAIK pre-epoch times are second-class citizens In wha

Re: [Rd] Conversion and rounding of POSIXct

2009-03-15 Thread Dirk Eddelbuettel
Stavros, Two really quick comments: a) you need to enable sub-second print formats b) AFAIK pre-epoch times are second-class citizens R> options("digits.secs"=6) ## print with 6 digits for microseconds R> t0 <- as.POSIXct('1974-01-05 23:59:59.1') R> t0 [1] "1974-01-05 23:59:59.1 CST"

[Rd] Conversion and rounding of POSIXct

2009-03-15 Thread Stavros Macrakis
POSIXct/lt supports fractional seconds (see Sub-second Accuracy section of man page), but there seem to be some inconsistencies in their handling. Converting to POSIXlt and back does not give back the same time for times before the origin: > t0 <- as.POSIXct('1934-01-05 23:59:59.1') > t0 [1]