From pego.enrico at tiscali.it  Wed Sep 10 17:35:07 2008
From: pego.enrico at tiscali.it (pego.enrico at tiscali.it)
Date: Wed, 10 Sep 2008 17:35:07 +0200 (CEST)
Subject: [Rd] format() under Windows giv wrong resuts with posix data
	(PR#12770)
Message-ID: <20080910153507.83665282EFF6@mail.pubhealth.ku.dk>

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



[Rd] format() under Windows giv wrong resuts with posix data (PR#12770)
pego.enrico at tiscali.it