Re: [R] as.POSIXct character string is not in a standard unambiguous format

2017-04-06 Thread Sebastien Moretti
This is far from portable programming but as R looks to search for /etc/localtime it is simpler for me do like that. I will not patch R source code to make "make check" step works. Then for my own code, I will use x <- as.POSIXct(strptime("2002-02-02 02:02", "%Y-%m-%d %H:%M")) or Sys.set

Re: [R] as.POSIXct character string is not in a standard unambiguous format

2017-04-06 Thread Jeff Newmiller
I cannot imagine a less desirable solution. This is the opposite of portable programming. -- Sent from my phone. Please excuse my brevity. On April 6, 2017 5:29:08 AM PDT, Sebastien Moretti wrote: >I have just found the solution. > >We have a custom Linux distribution that allows us to have

Re: [R] as.POSIXct character string is not in a standard unambiguous format

2017-04-06 Thread Jeff Newmiller
You always need to set your timezone somehow when converting to POSIXt. Technically the method for doing this varies by OS, but on all environments I have worked with you can set the default timezone with something like Sys.setenv( TZ="Etc/GMT+5" ) In your example, some timezones supporting da

Re: [R] as.POSIXct character string is not in a standard unambiguous format

2017-04-06 Thread Sebastien Moretti
I have just found the solution. We have a custom Linux distribution that allows us to have several R (+ glibc and others) versions in parallel for tools related to our job domain. We have another etc/ folder for those tools and R looks for the localtime file there, not in /etc/. So linking /

Re: [R] as.POSIXct character string is not in a standard unambiguous format

2017-04-05 Thread Sebastien Moretti
Hi Ben Thanks for your answer I have already tried this, as well as x <- as.POSIXct(strptime("2002-02-02 02:02", "%Y-%m-%d %H:%M")) It works! But it does not fix it widely for all tests used during the "make check" step at compile time. Unless I patch all of them. There is something with l

Re: [R] as.POSIXct character string is not in a standard unambiguous format

2017-04-05 Thread Ben Tupper
Hi, I can't answer the question about R 3.3.3, but I don't see anything in the update notes. http://mirror.its.dal.ca/cran/doc/manuals/r-release/NEWS.html In the meantime, would it skirt your issue if you explicitly stated the format? x <- as.POSIXct("2002-02-02 02:02", format = "%Y-%m-%d %H:

[R] as.POSIXct character string is not in a standard unambiguous format

2017-04-05 Thread Sebastien Moretti
Hi I have lots of issues when I try to install R 3.3.3 during the "make check" step. Every time a call to as.POSIXct is done in test scripts, I got the same error message: e.g. x <- as.POSIXct("2002-02-02 02:02") Error in as.POSIXlt.character(x, tz, ...) : character string is not in a stan