From juan_sr at uol.com.br  Mon Nov 22 13:01:31 2004
From: juan_sr at uol.com.br (Juan Santiago Ramseyer)
Date: Mon Nov 22 13:03:18 2004
Subject: [Rd] strptime() bugs?
In-Reply-To: <Pine.LNX.4.61.0411220728190.22893@gannet.stats>
References: <1101090880.4260.12.camel@localhost.localdomain>
	<Pine.LNX.4.61.0411220728190.22893@gannet.stats>
Message-ID: <1101124891.3419.7.camel@localhost.localdomain>

Em Seg, 2004-11-22 ?s 07:31 +0000, Prof Brian Ripley escreveu:
> The bug is in your (unstated) OS, probably in its locale handling.
> Does not happen on Solaris, Linux or Windows for me.
> 
> In any case, why not use as.Date?
> 
> On Mon, 22 Nov 2004, Juan Santiago Ramseyer wrote:
> 
> > strptime return wrong data?, look the R session.
> >
> >
> > # datetxt: vector of date in text format
> >> datetxt <- c("1939-Oct-06 00:00:00", "1939-Oct-07 00:00:00",
> >               "1939-Oct-08 00:00:00", "1939-Oct-09 00:00:00")
> >
> >> datehour <- strptime(datetxt,format= "%Y-%b-%d %H:%M:%S")
> >> datehour
> > [1] "1939-10-06 00:00:00" "1939-10-07 00:00:00" "1939-10-08 01:00:00"
> > [4] "1939-10-09 00:00:00"
> >
> > # look value of datehour[3] element, where hour output equal 01:00:00,
> > # but hour input equal 00:00:00.
> 
> Is there a DST issue in your unstated timezone?
> 
I run Fedora Core 3. In my computer, make

> julian(datehour)
Time differences of -11044.88, -11043.88, -11042.88, -11041.92 days

When de answer is not integer value 

Juan.


[Rd] strptime() bugs?
Juan Santiago Ramseyer