pego.enrico at tiscali.it
2008-Sep-10 15:35 UTC
[Rd] format() under Windows giv wrong resuts with posix data (PR#12770)
Full_Name: Enrico Pegoraro Version: 2.7.2 OS: Windows Submission from: (NULL) (87.4.187.101) The format(timevar,format="%I:%M:%S %p") instruction, with "timevar" a "POSIXt" "POSIXlt" variable, give wrong return data. The format sentence string "%I:%M:%S %p" requires times with AM/PM indicator, but the resulting output doesn't contain it. Example:> pippo=strptime("23:43:12", format="%H:%M:%S") > pippo[1] "2008-09-10 23:43:12"> class(pippo)[1] "POSIXt" "POSIXlt"> format(pippo, format="%I:%M:%S %p")[1] "11:43:12 " Note that in linux version of R format() works correctly. Best regards Enrico