From owner-freebsd-questions Mon Aug 16 16:17:20 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mailout1.nyroc.rr.com (mailout1-1.nyroc.rr.com [24.92.226.146]) by hub.freebsd.org (Postfix) with ESMTP id DD84C15975 for ; Mon, 16 Aug 1999 16:17:14 -0700 (PDT) (envelope-from reichman@twcny.rr.com) Received: from mail1.twcny.rr.com ([24.92.226.74]) by mailout1.nyroc.rr.com (Post.Office MTA v3.5.3 release 223 ID# 0-59787U250000L250000S0V35) with ESMTP id com; Mon, 16 Aug 1999 19:16:25 -0400 Received: from twcny.rr.com ([24.95.188.113]) by mail1.twcny.rr.com (Post.Office MTA v3.5.2 release 221 ID# 0-53939U80000L80000S0V35) with ESMTP id com; Mon, 16 Aug 1999 19:16:23 -0400 Message-ID: <37B89DFA.4176AF81@twcny.rr.com> Date: Mon, 16 Aug 1999 19:25:46 -0400 From: "Mark S. Reichman" X-Mailer: Mozilla 4.61 [en] (X11; I; FreeBSD 3.2-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: jim@jaguNET.com Cc: Eric Lee Green , freebsd-questions@FreeBSD.ORG Subject: Re: FreeBSD not Y2K compliant? References: <199908162245.SAA21886@devsys.jaguNET.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Yep.. Jim seems to be correct. tm_year is the years since 1900. /usr/src/include/time.h struct tm { int tm_sec; /* seconds after the minute [0-60] */ int tm_min; /* minutes after the hour [0-59] */ int tm_hour; /* hours since midnight [0-23] */ int tm_mday; /* day of the month [1-31] */ int tm_mon; /* months since January [0-11] */ int tm_year; /* years since 1900 */ int tm_wday; /* days since Sunday [0-6] */ int tm_yday; /* days since January 1 [0-365] */ int tm_isdst; /* Daylight Savings Time flag */ long tm_gmtoff; /* offset from CUT in seconds */ char *tm_zone; /* timezone abbreviation */ }; Jim Jagielski wrote: > > int tm_year; /* year - 1900 */ > > It's supposed to do that. > > Eric Lee Green wrote: > > > > The below prints "99" instead of "1999" :-(. AGH! I thought I left that behind > > with Xenix! > > > > #include > > #include > > #include > > int main (int argc,char **argv) { > > struct *tm t; > > time_t today; > > today=time(NULL); > > t=localtime(&today); > > printf("Year = %s\n",t->tm_year); > > } > > > > > > -- > > Eric Lee Green http://members.tripod.com/e_l_green > > mail: e_l_green@hotmail.com > > ^^^^^^^ Burdening Microsoft with SPAM! > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-questions" in the body of the message > > > > -- > =========================================================================== > Jim Jagielski ||| jim@jaguNET.com ||| http://www.jaguNET.com/ > "That's no ordinary rabbit... that's the most foul, > cruel and bad-tempered rodent you ever laid eyes on" > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message