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[1] "1969-01-01 01:00:01 CET"> as.POSIXct("1970-01-01 01:00")+0.3[1] "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.> R.version_ platform x86_64-w64-mingw32 arch x86_64 os mingw32 system x86_64, mingw32 status major 3 minor 5.1 year 2018 month 07 day 02 svn rev 74947 language R version.string R version 3.5.1 (2018-07-02) nickname Feather Spray
Am 09.10.2018 um 16:56 schrieb Russell, George:> 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 > [1] "1969-01-01 01:00:01 CET" >> as.POSIXct("1970-01-01 01:00")+0.3 > [1] "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.More likely a bug in the underlining C library The Cygwin build does not show the problem > as.numeric(as.POSIXct("1969-01-01 01:00")+0.3) [1] -31535999.7 > as.POSIXct("1969-01-01 01:00")+0.3 [1] "1969-01-01 01:00:00 CET" > as.numeric(as.POSIXct("1969-01-01 01:00")) [1] -31536000 > as.POSIXct("1969-01-01 01:00") [1] "1969-01-01 01:00:00 CET" > R.version _ platform x86_64-unknown-cygwin arch x86_64 os cygwin system x86_64, cygwin status major 3 minor 5.1 year 2018 month 07 day 02 svn rev 74947 language R version.string R version 3.5.1 (2018-07-02) nickname Feather Spray --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren gepr?ft. https://www.avast.com/antivirus
Seemingly Similar Threads
- Buglet in handling times in R-3.5.1
- Bug report: R.home() cause package Rcpp failed executing sourceCpp, similar bug are labeled "BUG 16660" since 2016 and here I could provide a solution that tested in my laptop.
- Possible bug, max argument in print.default(), on R-3.5.1-patched
- Re: ices0.4: icecast mp3 stream for source ?
- Bug report: Function ppois(0:20, lambda=0.9) does not generate a non-decreasing result.