From r|p|ey @end|ng |rom @t@t@@ox@@c@uk  Thu Oct  6 14:38:38 2022
From: r|p|ey @end|ng |rom @t@t@@ox@@c@uk (Prof Brian Ripley)
Date: Thu, 6 Oct 2022 13:38:38 +0100
Subject: [Rd] A potential POSIXlt->Date bug introduced in r-devel
In-Reply-To: <20221006164146.39f9b8e4@ECM-DTC-716.uniwa.uwa.edu.au>
References: <CABzLhzzsnRCwM3LPM-z2T8YFO3bBcD7=iE3Hxx9rLdEUeAkk3g@mail.gmail.com>
 <25406.36513.13316.676488@stat.math.ethz.ch>
 <20221006164146.39f9b8e4@ECM-DTC-716.uniwa.uwa.edu.au>
Message-ID: <df276af2-5024-05dd-1ccb-96ffbf6e980b@stats.ox.ac.uk>

On 06/10/2022 09:41, Berwin A Turlach wrote:
> G'day all,
> 
> On Thu, 6 Oct 2022 10:15:29 +0200
> Martin Maechler <maechler at stat.math.ethz.ch> wrote:
> 
>>>>>>> Davis Vaughan
>>>>>>>      on Wed, 5 Oct 2022 17:04:11 -0400 writes:
> 
>>      > # Weird, where is the `NA`?
>>      > as.Date(x)
>>      > #> [1] "2013-01-31" "1970-01-01" "2013-03-31"
>>      > ```
>>
>> I agree that the above is wrong, i.e., a bug in current  R-devel.
> 
> I have no intention of hijacking this thread, but I wonder whether this
> is a good opportunity to mention that the 32 bit build of R-devel falls
> over on my machine since 25 September.  It fails one of the regression
> tests in reg-tests-1d.R.  The final lines of reg-tests-1d.Rout.fail
> are:
> 
>> tools::Rd2txt(rd, out <- textConnection(NULL, "w"), fragment = TRUE)
>> stopifnot(any(as.character(rd) != "\n"),
> +           identical(textConnectionValue(out)[2L], "LaTeX"));
> close(out)
>> ## empty output in R <= 4.2.x

Yes, known for a few days on the R-core list. I am in the middle of an 
OS upgrade on that machine and won't have time to do more than report 
until that (and all the re-building and re-checking) is complete.

>> ## as.POSIXlt(<very large Date>)  gave integer overflow
>> stopifnot(as.POSIXlt(.Date(2^31 + 10))$year == 5879680L)
> Error: as.POSIXlt(.Date(2^31 + 10))$year == 5879680L is not TRUE
> Execution halted
> 
> 
> I should have reported this earlier, but somehow did not find the time
> to do so.  So I thought I mention it here. :)
> 
> Cheers,
> 
> 	Berwin
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford



[Rd] A potential POSIXlt->Date bug introduced in r-devel
Prof Brian Ripley