summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorgarbled <garbled>2000-01-04 21:33:57 +0000
committergarbled <garbled>2000-01-04 21:33:57 +0000
commit80b4d8b57997bfdaa5d69ecb34053d6339288d43 (patch)
tree536660fc37f9a67aac141be67d7bd42b72ca763d /misc
parentd9994d31a1b9c0f1943afb642863827294d0e059 (diff)
downloadpkgsrc-80b4d8b57997bfdaa5d69ecb34053d6339288d43.tar.gz
Critical y2k bug patch for xfinans.
Diffstat (limited to 'misc')
-rw-r--r--misc/xfinans/patches/patch-aa23
1 files changed, 23 insertions, 0 deletions
diff --git a/misc/xfinans/patches/patch-aa b/misc/xfinans/patches/patch-aa
new file mode 100644
index 00000000000..5120d7cb695
--- /dev/null
+++ b/misc/xfinans/patches/patch-aa
@@ -0,0 +1,23 @@
+$NetBSD: patch-aa,v 1.1 2000/01/04 21:33:57 garbled Exp $
+--- date.c.orig Tue Jan 4 14:24:18 2000
++++ date.c Tue Jan 4 14:24:24 2000
+@@ -162,6 +162,8 @@
+ yr assumed w/in +/- 50 years from current time if < 100.
+ gives clean method for handling 2-digit year input.
+ */
++ if( yr > 99 && yr < MIN_YEAR) /* y2k */
++ yr -= 100;
+ if( yr < 100 ) {
+
+ if( yr <= this_year() - 50 )
+@@ -399,9 +401,8 @@
+ now /= 3600; /* convert to hours */
+ now /= 24; /* convert to days */
+ now /= 365.25; /* convert to years */
+- now /= 100; /* convert to centurys */
+-
+ now += 1970; /* from offset to absolute */
++/* now /= 100; /* convert to centurys */
+ century = now - (now % 100); /* round to nearest 100 */
+ }
+