blob: 37c618abf428faad073ca46dc3d6d9c784fcaa32 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
--- 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);
|