Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jun 2009 00:00:08 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/63064: commit references a PR
Message-ID:  <200906260000.n5Q008DI057623@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/63064; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/63064: commit references a PR
Date: Thu, 25 Jun 2009 23:59:37 +0000 (UTC)

 Author: delphij
 Date: Thu Jun 25 23:59:23 2009
 New Revision: 195015
 URL: http://svn.freebsd.org/changeset/base/195015
 
 Log:
   Implement %z for strptime.
   
   PR:		kern/63064
   Submitted by:	Stefan `Sec` Zehl <sec 42 org> (with some small changes)
   MFC after:	1 month
 
 Modified:
   head/lib/libc/stdtime/strptime.c
 
 Modified: head/lib/libc/stdtime/strptime.c
 ==============================================================================
 --- head/lib/libc/stdtime/strptime.c	Thu Jun 25 23:22:25 2009	(r195014)
 +++ head/lib/libc/stdtime/strptime.c	Thu Jun 25 23:59:23 2009	(r195015)
 @@ -514,6 +514,34 @@ label:
  			}
  			}
  			break;
 +
 +		case 'z':
 +			{
 +			int sign = 1;
 +
 +			if (*buf != '+') {
 +				if (*buf == '-')
 +					sign = -1;
 +				else
 +					return 0;
 +			}
 +
 +			buf++;
 +			i = 0;
 +			for (len = 4; len > 0; len--) {
 +				if (isdigit((int)*buf)) {
 +					i *= 10;
 +					i += *buf - '0';
 +					buf++;
 +				} else
 +					return 0;
 +			}
 +
 +			tm->tm_hour -= sign * (i / 100);
 +			tm->tm_min  -= sign * (i % 100);
 +			*GMTp = 1;
 +			}
 +			break;
  		}
  	}
  	return (char *)buf;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906260000.n5Q008DI057623>