File: fix_y2k

package info (click to toggle)
ifmail 2.14tx8.10-32
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,056 kB
  • sloc: ansic: 30,328; perl: 4,955; yacc: 839; makefile: 716; sh: 424; cpp: 235; lex: 206; awk: 24
file content (14 lines) | stat: -rw-r--r-- 427 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- a/iflib/rfcdate.c
+++ b/iflib/rfcdate.c
@@ -16,9 +16,9 @@ time_t now;
 	if (!now) time(&now);
 	ptm=*localtime(&now);
 
-	sprintf(buf,"%s, %02d %s %02d %02d:%02d:%02d %s",
+	sprintf(buf,"%s, %02d %s %d %02d:%02d:%02d %s",
 		wdays[ptm.tm_wday],ptm.tm_mday,months[ptm.tm_mon],
-		ptm.tm_year%100,ptm.tm_hour,ptm.tm_min,ptm.tm_sec,
+		1900+ptm.tm_year,ptm.tm_hour,ptm.tm_min,ptm.tm_sec,
 		gmtoffset(now));
 	return(buf);
 }