Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!njin!princeton!udel!mmdf From: V61%DHDURZ1.BITNET@cunyvm.cuny.edu (Ronald Lamprecht) Newsgroups: comp.os.minix Subject: lib/ctime.c -- bug fix Message-ID: <18185@louie.udel.EDU> Date: 21 Jun 89 18:31:50 GMT Sender: mmdf@udel.EDU Lines: 51 The improved library routine 'ctime.c' as posted in (1) and (2) contains a bug: The function 'ctime' used by 'localtime' and 'gmttime' stores the absolute year count into 'tm.tm_year' instead of the offset to 1900. Localtime and gmttime will therefore return wrong values. Furthermore I have added the external variable timezone which may be referenced by programs using localtime. I have included a uuencoded (sorry, but I'm on EBCDIC-Bitnet) cdiff for ctime.c. (1) pc13 update (2) Re: commands/date.c bug + fix by Andy Tanenbaum from 3 Jan 89 Bitnet: V61@DHDURZ1 Ronald Lamprecht UUCP: ...!unido!DHDURZ1.bitnet!V61 Theoretische Physik ARPAnet: V61%DHDURZ1.BITNET@CUNYVM.CUNY.EDU (Heidelberg, West Germany) --------------------------------cut here------------------------------------ begin 644 ctime.c_cdiff M*BHJ(&-T:6UE+F-?<#$S"51H=2!!<'(@,C@@,C(Z-#(Z-3<@,3DX.0HM+2T@ M8W1I;64N8PE4:'4@2G5N(#(P(# S.C4T.C(T(#$Y.#D**BHJ*BHJ*BHJ*BHJ M*BHJ"BHJ*B Q."PR,R J*BHJ"BTM+2 Q."PR-" M+2TM"B @"B @F]N92 ](#!,.PH@( H@(&-H87(@*F-T:6UE*'!T*0H@(&QO;F<@ M*G!T.PHJ*BHJ*BHJ*BHJ*BHJ*BH**BHJ(#,Y+#0U("HJ*BH*(" )"71M+G1M M7WEE87(@*ST@,3L*(" )"70@+3T@>65A2 C(&]F('1H92!Y96%R+"!*86X@,2 ](# @ M*B\*+2TM(#0P+#0V("TM+2T*(" )"71M+G1M7WEE87(@*ST@,3L*(" )"70@ M+3T@>65A65A61A>2 ]("AT+T1!62D["0DO*B!D87D@ M(R!O9B!T:&4@>65A7-;=&TN=&U?=V1A>5TL(&UO;G1H2P@=&TN=&U?:&]U