NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/41762



The following reply was made to PR bin/41762; it has been noted by GNATS.

From: Christopher Berardi <cberardi%natoufa.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/41762
Date: Fri, 19 Feb 2010 18:40:23 -0500

 Here is a patch that will make this update the time to the next day if it has 
past the time.
 
 
 
 --- parsetime.c.orig   2010-02-19 18:33:57.000000000 -0500
 +++ parsetime.c        2010-02-19 18:33:19.000000000 -0500
 @@ -405,7 +405,8 @@
         * if we've gone past that time - but if we're specifying a time plus
         * a relative offset, it's okay to bump things
         */
 -      if ((sc_tokid == TOKEOF || sc_tokid == PLUS) && tm->tm_hour > hour) {
 +      if ((sc_tokid == TOKEOF || sc_tokid == PLUS) && (tm->tm_hour > hour) || 
 +          (tm->tm_hour == hour && tm->tm_min >= minute)) {
                tm->tm_mday++;
                tm->tm_wday++;
        }
 
 
 
 -- 
 Christopher Berardi
 http://www.natoufa.com/
 
 Be still, and know that I am God (Psalms 46:10)
 


Home | Main Index | Thread Index | Old Index