format.nanotime loses nanotime precision #12

Closed
lsilvest opened this Issue Jan 30, 2017 · 2 comments

Projects

None yet

2 participants

@lsilvest

Can be reproduced like this:

n <- nanotime("2120-01-01T00:00:59.987654321+00:00")
format(n)
## [1] "2120-01-01T00:00:59.987653809+00:00"
@eddelbuettel
Owner

Confirmed. Probably a scaling issue similar to what we found in RcppCCTZ.

@eddelbuettel
Owner

Should be fixed in a branch I just added:

R> library(nanotime)
R> n <- nanotime("2120-01-01T00:00:59.987654321+00:00"); format(n)
[1] "2120-01-01T00:00:59.987654321+00:00"
R> 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment