Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: iglesias@draco.acs.uci.edu (Mike Iglesias)
Subject: Re: localtime() function on DEC Alpha OSF/1
Date: 14 Aug 93 02:11:02 GMT	[thread overview]
Message-ID: <2C6C49B6.28355@news.service.uci.edu> (raw)
In-Reply-To: 24gqmpINNe5r@rave.larc.nasa.gov

In article <24gqmpINNe5r@rave.larc.nasa.gov>,
Richard Eckman <eckman@eos1.larc.nasa.gov> wrote:
>  Is there a problem with the localtime() function under OSF/1 on the DEC
>Alpha systems?  Using the program below, I can't seem to get anything
>by garbage for the tm_gmtoff (offset in seconds from the Greenwich meridian)
>value.

Yes, there's a bug.  Change this line in your program:

	printf("tm->tm_gmtoff = %ld\n", (long)tm->tm_gmtoff/60);

to this:

	printf("tm->tm_gmtoff = %ld\n", (int)tm->tm_gmtoff/60);

I found this a while back; I think DEC said it would be fixed in OSF v1.3,
but I'm not sure.  The problem is that the upper 32 bits of the long are
not setup properly so you get garbage.

-- 
Mike Iglesias                        Internet:    iglesias@draco.acs.uci.edu
University of California, Irvine     BITNET:      iglesias@uci
Office of Academic Computing         uucp:        ...!ucbvax!ucivax!iglesias
Distributed Computing Support        phone:       (714) 856-6926


  reply	other threads:[~1993-08-14  2:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-08-13 19:40 localtime() function on DEC Alpha OSF/1 Richard Eckman
1993-08-14  2:11 ` Mike Iglesias [this message]
1993-08-14  8:25   ` Burkhard Neidecker-Lutz
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox