Plan 9 from Bell Labs’s /usr/web/sources/contrib/yk/dist/9legacy/applied/libc-ctime-2100.diff

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


--- /n/sources/plan9/sys/src/libc/9sys/ctime.c	Wed Apr 24 23:03:52 2013
+++ /sys/src/libc/9sys/ctime.c	Sun Nov  6 00:00:00 2016
@@ -182,7 +182,7 @@
 	cbuf[22] = *ncp;
 	if(t->year >= 100) {
 		cbuf[24] = '2';
-		cbuf[25] = '0';
+		cbuf[25] = t->year >= 200? '1': '0';  
 	}
 	ct_numb(cbuf+26, t->year+100);
 	return cbuf;
--- /n/sources/plan9/sys/src/ape/lib/ap/plan9/ctime.c	Wed May 29 02:21:18 2013
+++ /sys/src/ape/lib/ap/plan9/ctime.c	Sun Nov  6 00:00:00 2016
@@ -195,7 +195,7 @@
 	ct_numb(buf+17, t->tm_sec+100);
 	if(t->tm_year >= 100) {
 		buf[20] = '2';
-		buf[21] = '0';
+		buf[21] = t->tm_year >= 200? '1': '0';  
 	}
 	ct_numb(buf+22, t->tm_year+100);
 	return buf;

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.