[Python-Dev] Vacation and possibly a new bug

Brett C. drifty@alum.berkeley.edu
Tue, 22 Jul 2003 16:20:22 -0700


Neal Norwitz wrote:
> The patch below fixes test_time on RedHat 6.2/Alpha.  Since I don't
> understand the code, I haven't the slighest clue if the patch is
> correct or not.  But I do know what (365 * 24 * 3600) is.  :-)
> I don't know what ((365 * 24 + 6) * 3600) is supposed to represent.  
> 1 year + 6 hours in seconds.  What's that?
> 

And why does ``t = (time((time_t *)0) / YEAR) * YEAR;`` on line 608 have 
to divide by YEAR and then multiply by YEAR?  Shouldn't those cancel out?

The idea seeems reasonable if you stare at the code since the division 
might be causing the time_t to wrap around the year when it divides by 2 
and thus get the wrong part of the year.  But as Neal said I would defer 
to Stuart for saying whether this is a good fix or not.

-Brett