[R] Error in as.POSIXlt.character(x, tz, ...)
Jinsong Zhao
j@zh@o @end|ng |rom ye@h@net
Thu May 11 11:37:23 CEST 2023
On 2023/5/11 17:24, Jeff Newmiller wrote:
> I find your claim suspect... a period is not interchangeable with a colon.
Good catching, but
In R 4.3.0 on FreeBSD, the same error after changing the period to a colon:
> as.POSIXct("1970-01-01 00:00:00 UTC")
Error in as.POSIXlt.character(x, tz, ...) :
character string is not in a standard unambiguous format
I copy the code from a web page. It works in R 4.3.0 on Windows and R
4.1.2 on an old CentOS.
Best,
Jinsong
>
> On May 11, 2023 1:56:41 AM PDT, Jinsong Zhao <jszhao using yeah.net> wrote:
>> Hi there,
>>
>> When I run the following code in R 4.3.0 on FreeBSD, I got error.
>>
>>> as.POSIXct("1970-01-01 00:00.00 UTC")
>> Error in as.POSIXlt.character(x, tz, ...) :
>> character string is not in a standard unambiguous format
>>
>> The same code could give correct answer in R 4.3.0 on Windows, and R 4.1.2 on a old CentOS.
>>
>>> as.POSIXct("1970-01-01 00:00.00 UTC")
>> [1] "1970-01-01 CST"
>>
>> I confirmed that all the 3 OSes give the same time zone:
>>> Sys.timezone()
>> [1] "Asia/Shanghai"
>>
>> What's wrong with the R on FreeBSD? Any hint? Thanks in advance.
>>
>> Best,
>> Jinsong
>>
>> ______________________________________________
>> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list