mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-23 04:23:08 +00:00
3a7c9e3d91
o Y2K problem. o repl coredump problem. Submitted by: mh-plus project (japanese/mh developper)
39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
--- zotnet/tws/dtime.c.orig Tue Feb 9 20:30:00 1999
|
|
+++ zotnet/tws/dtime.c Tue Jan 4 20:46:46 2000
|
|
@@ -170,7 +170,7 @@
|
|
tw.tw_hour = tm -> tm_hour;
|
|
tw.tw_mday = tm -> tm_mday;
|
|
tw.tw_mon = tm -> tm_mon;
|
|
- tw.tw_year = tm -> tm_year + CENTURY;
|
|
+ tw.tw_year = tm -> tm_year + 1900;
|
|
tw.tw_wday = tm -> tm_wday;
|
|
tw.tw_yday = tm -> tm_yday;
|
|
if (tm -> tm_isdst)
|
|
@@ -212,7 +212,7 @@
|
|
tw.tw_hour = tm -> tm_hour;
|
|
tw.tw_mday = tm -> tm_mday;
|
|
tw.tw_mon = tm -> tm_mon;
|
|
- tw.tw_year = tm -> tm_year + CENTURY;
|
|
+ tw.tw_year = tm -> tm_year + 1900;
|
|
tw.tw_wday = tm -> tm_wday;
|
|
tw.tw_yday = tm -> tm_yday;
|
|
if (tm -> tm_isdst)
|
|
@@ -370,12 +370,14 @@
|
|
|| (min = tw -> tw_min) < 0 || min > 59
|
|
|| (hour = tw -> tw_hour) < 0 || hour > 23
|
|
|| (mday = tw -> tw_mday) < 1 || mday > 31
|
|
- || (mon = tw -> tw_mon + 1) < 1 || mon > 12)
|
|
+ || (mon = tw -> tw_mon + 1) < 1 || mon > 12
|
|
+ || (year = tw -> tw_year) < 0)
|
|
return (tw -> tw_clock = -1L);
|
|
- year = tw -> tw_year;
|
|
|
|
result = 0L;
|
|
- if (year < 100)
|
|
+ if (year < 69)
|
|
+ year += CENTURY + 100;
|
|
+ else if (year < 100)
|
|
year += CENTURY;
|
|
for (i = 1970; i < year; i++)
|
|
result += dysize (i);
|