> I noticed that timeAlign() seems broken in S-PLUS 7.0: when given
> dir=-1, it aligns some days that are the 31st of a month to the next
> day. S-PLUS 6.X does not have this problem.
We've looked into it, and it turns out that the actual bug is related to use
of relative dates. I've posted additional information at:
http://www.insightful.com/insightful_faq/dsp_article.asp?articleID=304
It seems like the underlying bug with relative time arithmatic has existed
for a while, but hadn't been reported before. We made a change in the S code
for timeAlign from 6.2 to 7.0 which tickled the underlying bug. We've fixed
the problem in the C code of our internal builds, and it also fixes the
timeAlign issue. That fix will be included in a forthcoming patch.
> (1) is using the old timeAlign function in 7.0 going to be OK, or are
> there other functions in 7.0 that depend on some aspects of the new
> (buggy) timeAlign function?
Using the version of timeAlign from S-PLUS 6.2 is fine for now. The 6.2
version doesn't use relative dates in its internal computations, which is the
underlying source of the bug.
> (2) does anyone know of any other bugs introduced in timeDate
> handling in 7.0?
It turns out the bug was already there, but a fix is forthcoming. I'm not
aware of any other issues with date handling at present.
# David Smith
--
David M Smith <dsmith@insightful.com>
Product Manager, Insightful Corp, Seattle WA
Tel: +1 (206) 802 2360
Fax: +1 (206) 283 6310
Insightful 2005 User Conference
Princeton, NJ, Oct. 26-27, 2005
Don't miss the keynote by Dr. William Meeker
Special Pricing: $199 commercial/$99 academic
www.insightful.com/news_events/2005uc
> -----Original Message-----
> From: Tony Plate [mailto:tplate@blackmesacapital.com]
> Sent: Friday, September 16, 2005 8:14 AM
> To: S-news
> Subject: [S] bug in timeAlign in S-PLUS 7.0
>
>
> I noticed that timeAlign() seems broken in S-PLUS 7.0: when given
> dir=-1, it aligns some days that are the 31st of a month to the next
> day. S-PLUS 6.X does not have this problem.
>
> E.g.:
>
> > d <- timeDate("08/31/2000", format="%Y/%02m/%02d
> %02H:%02M:%02S %z",
> in.format="[%m[/][.]%d[/][,]%y] [%H[:%M[:%S[.%N]]][%p][[(]%3Z[)]]]",
> zone="GMT")
> > # Wrong behavior in S-PLUS 7.0
> > version
> Enterprise Developer Version 7.0.3 for Microsoft Windows : 2005
> > d
> [1] 2000/08/31 00:00:00 GMT
> > timeAlign(d, by="days", dir=-1)
> [1] 2000/09/01 00:00:00 GMT
> > q()
>
> > # Correct behavior in S-PLUS 6.2
> > version
> Professional Edition Version 6.2.1 for Microsoft Windows : 2003
> > d
> [1] 2000/08/31 00:00:00 GMT
> > timeAlign(d, by="days", dir=-1)
> [1] 2000/08/31 00:00:00 GMT
>
>
> The timeAlign function has changed from 6.2.1 to 7.0, and I
> found that
> using the old timeAlign function from 6.2.1 seems to work ok
> in 7.0 and
> give correct answers in these cases.
>
> AFAICS, this behavior happens for all days that are the 31st of the
> month, except for July 31st and Dec 31st.
>
> So, I was wondering if anyone had any insights on the following:
>
> (1) is using the old timeAlign function in 7.0 going to be OK, or are
> there other functions in 7.0 that depend on some aspects of the new
> (buggy) timeAlign function?
>
> (2) does anyone know of any other bugs introduced in timeDate
> handling
> in 7.0?
>
> -- Tony Plate
>
> PS: in case anyone was wondering, I did submit a report on this to
> Insightful (some time ago) but I have not heard any response
> from them.
> --------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu. To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message: unsubscribe s-news
>
|