Message-ID: <A5ACB5B943D55E459C74B67E684A6CE9021A169F@MAVS1.kendall.corp.akamai.com>
Date: 2009-05-05T18:55:17Z
From: Galkowski, Jan
Subject: documenting quirky behavior of as.POSIXct, as.POSIX.lt regarding AM/PM, possibly other cases
In-Reply-To: <mailman.26.1241172014.15918.r-help@r-project.org>
I wanted to put this on the R Wiki, but found the suitable pages were read-only. I wanted to get it out in public to save people work.
I was converting dates like "2009/03/26 01:00:00 AM" using as.POSIXct. I found that using a format of "%Y/%m/%d %I:%M:%S %p" did not work correctly to distinguish AM from PM. Both were converted into the same timestamp. Indeed, what I found worked was affixing a space after the string timestamp to produce "2009/03/26 01:00:00 AM " or "2009/03/26 01:00:00 PM ". That works.
Didn't see this documented in the associated pages anywhere.
I wonder if the help system might benefit from user comments like for instance PHP has?