From m@rco@@tzeri @ending from gm@il@com  Tue Oct  9 18:59:37 2018
From: m@rco@@tzeri @ending from gm@il@com (Marco Atzeri)
Date: Tue, 9 Oct 2018 18:59:37 +0200
Subject: [Rd] Buglet in handling times in R-3.5.1
In-Reply-To: <HE1PR1001MB10356685E98F585AEB6F6ED5A0E70@HE1PR1001MB1035.EURPRD10.PROD.OUTLOOK.COM>
References: <HE1PR1001MB10356685E98F585AEB6F6ED5A0E70@HE1PR1001MB1035.EURPRD10.PROD.OUTLOOK.COM>
Message-ID: <3ccc13a5-6688-6dc3-772d-b78b7a01f7c4@gmail.com>

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



[Rd] Buglet in handling times in R-3.5.1
Marco Atzeri