[Rd] Buglet in handling times in R-3.5.1
emil@bode @ending from d@n@@kn@w@nl
Tue Oct 9 18:12:41 CEST 2018
Here on my Mac it looks worse: not a rounding difference, but an off-by-one error for fractional seconds before 1970, looks like the conversion to POSIXlt is doing something wrong:
# As expected
# An additional second disappears (and no, there was no (negative) leap second)
I'm not enough at home in C to get to the core of it, the problem is in the .Internal call
Hoping somebody can investigate further.
Specs: R 3.5.1; macOS 10.13.6
On 09/10/2018, 17:27, "R-devel on behalf of Russell, George" <r-devel-bounces using r-project.org on behalf of g.russell using eos-solutions.com> wrote:
Dear R developers,
I have found a minute bug in R-3.5.1 (Windows version), about how times not an exact number of seconds are displayed.
> as.POSIXct("1969-01-01 01:00")+0.3
 "1969-01-01 01:00:01 CET"
> as.POSIXct("1970-01-01 01:00")+0.3
 "1970-01-01 01:00:00 CET"
So for 1969, adding 0.3 of a second means you round UP, for 1970 you round DOWN. But I think it should be consistent.
At the end of this message I have put the usual version information.
Thanks for all your help and for your work on this wonderful product.
system x86_64, mingw32
svn rev 74947
version.string R version 3.5.1 (2018-07-02)
nickname Feather Spray
R-devel using r-project.org mailing list
More information about the R-devel