Date: Sat, 1 Jan 2000 14:16:24 -0800 From: David Bushong <david@bushong.net> To: ports@freebsd.org Subject: x11-clocks/dclock Y2K patch Message-ID: <20000101141624.A4134@Bushong.NET>
next in thread | raw e-mail | index | archive | help
Here's a fix. Dclock was barfing on Y2K: This file to go in x11-clocks/dclock/patches/patch-ad: (uuencoded gzipped at the bottom) ---------------8<------------------------------------8<------------------ *** Dclock.c.orig Sat Jan 1 14:05:54 2000 --- Dclock.c Sat Jan 1 14:09:29 2000 *************** *** 1000,1010 **** *datep++ = (now->tm_mday / 10 + '0'); *datep++ = now->tm_mday % 10 + '0'; when 'Y': ! *datep++ = '1', *datep++ = '9'; /* fall thru */ case 'y': ! *datep++ = now->tm_year / 10 + '0'; ! *datep++ = now->tm_year % 10 + '0'; when '%': *datep++ = *p; otherwise: ; /* nothing */ --- 1000,1011 ---- *datep++ = (now->tm_mday / 10 + '0'); *datep++ = now->tm_mday % 10 + '0'; when 'Y': ! *datep++ = (now->tm_year + 1900) / 1000 + '0'; ! *datep++ = ((now->tm_year + 1900) / 100) % 10 + '0'; /* fall thru */ case 'y': ! *datep++ = ((now->tm_year + 1900) % 100) / 10 + '0'; ! *datep++ = ((now->tm_year + 1900) % 100) % 10 + '0'; when '%': *datep++ = *p; otherwise: ; /* nothing */ --------------------8<----------------------------8<--------------------- begin 644 patch-ad.gz M'XL(`"I[;C@``]6236^",!C'S_@I_CN02K'2&CU0LIUVVG6GG98&.R%#,-B% M\.U7-!I@KKID6;+G]KS\GG=**1[3HDK?Y^F\JO.-]ZP,GE0)"(BEY"NY6F+! M.9\PQLZAXZA8+N)C%!U*IT-8QTQPP7$PX:+0M3)Z%X:XQ[2L&O9@MJ_;M6H1 M61XA""=!<H'M<0/,/V-CJLET"?)"Y.3.E8T(,AOH\9=,$<6;*@J8K/X`C4;> M5.TU2'NMSJGK5JNZ-VSR`^K:K+[MP;DYNAN#E<ETW>1[+9%T<Y;6D)>;;LKN M$4XG%;`:^R\GG0ZV%D+$G`>';GAOZY[71QQ,X.CH5U[CF^+^L?C-O^).\[?/ *\PG:676L<00```ZV ` end --David Bushong To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000101141624.A4134>