Article View: comp.sources.bugs
Article #2155Mush - patch for UTX/32 2.1a
From: Mike Hoffman
Date: Fri, 24 Mar 1989 16:08
Date: Fri, 24 Mar 1989 16:08
46 lines
1736 bytes
1736 bytes
While compiling mush 6.4, I ran across a rather unexpected
problem during loading: "_timezone: undefined." Well I tried
"man timezone" and got the manpage for ctime(3), but timezone()
was missing from the page!
Well, we recently upgraded to UTX/32 2.1a, and an older manual
from 2.0 (which had timezone) says, "timezone may become
unsupported in a future release. Use ... is strongly discouraged."
I guess the future is now :-)
Anyhow, here is my kludge (I mean fix). Not very scientific, but
it seems to work. We are on Eastern Time, but I guess the "EST"
and "EDT" could be #define'd to any appropriate timezone.
Thanks to Mr. Heller for providing such a great tool!
---
Mike Hoffman ...!novavax!gould!mhoffman
------------------------CUT HERE------------------------------
*** dates.orig.c Fri Mar 24 10:45:19 1989
--- dates.c Fri Mar 24 10:52:01 1989
***************
*** 219,225 ****
(void) gettimeofday(&mytime, &myzone);
T = localtime(&mytime.tv_sec);
! tz = timezone(myzone.tz_minuteswest, (T->tm_isdst && myzone.tz_dsttime));
#else
char *tz = "";
#endif /* BSD */
--- 219,230 ----
(void) gettimeofday(&mytime, &myzone);
T = localtime(&mytime.tv_sec);
!
! if (T->tm_isdst)
! tz = "EDT"; /* Assume Eastern Time ;-) */
! else
! tz = "EST";
!
#else
char *tz = "";
#endif /* BSD */
Technical Details
Message-ID:
<1799@infocenter.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!novavax!infocenter!mhoffmanShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!novavax!infocenter!mhoffman From: mhoffman@infocenter.UUCP (Mike Hoffman) Newsgroups: comp.sources.bugs Subject: Mush - patch for UTX/32 2.1a Message-ID: <1799@infocenter.UUCP> Date: 24 Mar 89 16:08:32 GMT Organization: Gould CSD, Fort Lauderdale, FL Lines: 46