Re: [R] Problem with as.POSIXlt$hour

From: Uwe Ligges <>
Date: Tue, 15 Jun 2010 15:34:48 +0200

On 15.06.2010 13:45, PtitBleu wrote:
> Hello,
> In one of my functions, I need to extract the hour from a date.
> For example:
> as.POSIXlt("2010-03-27 02:00:00")$hour gives 2 as expected.
> It works for all the dates I've tested except the following one which is in
> my list of dates:
> as.POSIXlt("2010-03-28 02:00:00")$hour which gives 0.
> I don't understand why it doesn't work with this particular date.
> Any idea ?
> Thanks in advance,
> Ptit Bleu (with R 2.9.0 under Windows ).

Perhaps it has been fixed within the last > 12 months since R-2.9.0 has been released?

Please try a recent version of R.

Uwe Ligges mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue 15 Jun 2010 - 13:36:52 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 15 Jun 2010 - 13:40:31 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive