There are many caveats about OS specificity on the strptime help page, but
most of them have to do with formatting and fewer with validation. My
reading of the strptime page indicates that conversion with as.POSIXct()
will validate daylight savings times which the examples I gave indicate it
is no
Hello,
R 4.0.3 on Ubuntu 20.04, sessionInfo() below.
A fix is to use as.POSIXct instead:
rui@rui:~$ Rscript --vanilla -e 'as.POSIXlt("2018-03-11 02:09",
tz="America/New_York")'
#[1] "2018-03-11 02:09:00 EDT"
rui@rui:~$ Rscript --vanilla -e 'as.POSIXct("2018-03-11 02:09",
tz="America/New_York
This is as described in the documentation, due to OS differences, e.g
[1].
[1] https://stat.ethz.ch/R-manual/R-devel/library/base/html/strptime.html
On January 18, 2021 5:56:11 PM PST, Bill Denney
wrote:
>Hello,
>
>
>
>Dates created with as.POSIXct differ between Windows/Mac and Linux.
>Specif
3 matches
Mail list logo