Newsgroups: comp.std.c Path: utzoo!sq!msb From: msb@sq.sq.com (Mark Brader) Subject: Re: Questions about mktime() Message-ID: <1991Jan28.230127.14003@sq.sq.com> Organization: SoftQuad Inc., Toronto, Canada References: <2582@root44.co.uk> <14952@smoke.brl.mil> <1991Jan28.224605.12960@sq.sq.com> Date: Mon, 28 Jan 91 23:01:27 GMT Lines: 20 Oops. I just posted an article containing this example: > struct tm s = localtime(t); > s.tm_year++; /* advance by one year */ > s.tm_isdst = -1; /* negative --> "please determine DST" */ > t = mktime(s); This should of course be: struct tm *s = localtime(&t); s->tm_year++; /* advance by one year */ s->tm_isdst = -1; /* negative --> "please determine DST" */ t = mktime(s); Sorry about that. I was forgetting, of course, that localtime() predates the passing of types wider than int as arguments. -- Mark Brader, SoftQuad Inc., Toronto, utzoo!sq!msb, msb@sq.com "I'm a little worried about the bug-eater," she said. "We're embedded in bugs, have you noticed?" -- Niven, "The Integral Trees" This article is in the public domain.