Re: [R] Bug in as.POSIXct regarding AM/PM

2010-10-08 Thread 曾振兴
My locale information is as follows: > sessionInfo() R version 2.11.1 (2010-05-31) i386-pc-mingw32 locale: [1] LC_COLLATE=Chinese (Simplified)_People's Republic of China.936 [2] LC_CTYPE=Chinese (Simplified)_People's Republic of China.936 [3] LC_MONETARY=Chinese (Simplified)_People's Republ

Re: [R] Bug in as.POSIXct regarding AM/PM

2010-10-08 Thread Ei-ji Nakama
Hi, > Sys.setenv(TZ="PRC") > Sys.setlocale("LC_TIME", "Chinese") [1] "Chinese (Simplified)_People's Republic of China.936" > as.POSIXct("2009/03/26 01:00:00 上午" , format="%Y/%m/%d %I:%M:%S %p") [1] "2009-03-26 01:00:00 CST" > as.POSIXct("2009/03/26 01:00:00 下午" , format="%Y/%m/%d %I:%M:%S %p") [1]

Re: [R] Bug in as.POSIXct regarding AM/PM

2010-10-08 Thread Prof Brian Ripley
On Fri, 8 Oct 2010, David Winsemius wrote: On Oct 8, 2010, at 5:54 AM, Ted Zeng (曾振兴) wrote: Dear All, I encounted in a problem with as.POSIXct() function. as.POSIXct("2009/03/26 01:00:00 AM" , format="%Y/%m/%d %I:%M:%S %p") [1] NA as.POSIXct("2009/03/26 02:00:00 PM" , format="%Y/%m/%d

Re: [R] Bug in as.POSIXct regarding AM/PM

2010-10-08 Thread Gabor Grothendieck
On Fri, Oct 8, 2010 at 5:54 AM, Ted Zeng (曾振兴) wrote: > > Dear All, > > I encounted in a problem with as.POSIXct() function. > >> as.POSIXct("2009/03/26 01:00:00 AM" , format="%Y/%m/%d %I:%M:%S %p") > [1] NA >> as.POSIXct("2009/03/26 02:00:00 PM" , format="%Y/%m/%d %I:%M:%S %p") > [1] NA > > I hav

Re: [R] Bug in as.POSIXct regarding AM/PM

2010-10-08 Thread David Winsemius
On Oct 8, 2010, at 5:54 AM, Ted Zeng (曾振兴) wrote: Dear All, I encounted in a problem with as.POSIXct() function. as.POSIXct("2009/03/26 01:00:00 AM" , format="%Y/%m/%d %I:%M:%S %p") [1] NA as.POSIXct("2009/03/26 02:00:00 PM" , format="%Y/%m/%d %I:%M:%S %p") [1] NA I have tried this in t