www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/08/24/18:41:31

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-developers-unsubscribe-archive-cygwin-developers=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>,
<http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Message-Id: <199908242239.RAA01056@mercury.xraylith.wisc.edu>
To: cygwin-developers AT sourceware DOT cygnus DOT com
Subject: Re: timezone() errors
In-Reply-To: Your message of "Tue, 24 Aug 1999 22:19:16 +0200."
<000001beee6d$f0f92ba0$3a5ac5c1 AT guinan>
Date: Tue, 24 Aug 1999 17:39:37 -0500
From: Mumit Khan <khan AT xraylith DOT wisc DOT EDU>

"Norbert Schulze" <Norbert DOT Schulze AT rhein-neckar DOT de> writes:
> 
> I have found some information here: 
> http://www.ajk.tele.fi/libc/gen/timezone.3.html

And, sorry to say, somewhat irrelevant since that refers to NetBSD
C library, not something we need to conform to. 

We should be shooting for SuSv2 (Single Unix Specs v2) conformance
when POSIX doesn't have anything to say. These documents are widely
available (you can buy them or get them from a library, and I don't
know any software outfit that don't keep a few copies on the shelf)
and easy to look up.

Here's the bit about timezone:


                 The Single UNIX ® Specification, Version 2
     _________________________________________________________________
   
     NAME
    
     tzset - set time zone conversion information
     
     SYNOPSIS
    

#include <time.h>

void tzset (void);
extern char *tzname[];
extern long int timezone;
extern int daylight;

     DESCRIPTION
    
     The tzset() function uses the value of the environment variable TZ
     to set time conversion information used by localtime(), ctime(),
     strftime() and mktime(). If TZ is absent from the environment,
     implementation-dependent default time zone information is used.
     
     The tzset() function sets the external variable tzname as follows:

tzname[0] = "std";
tzname[1] = "dst";

     where std and dst are as described in the XBD specification,
     Environment Variables .
     
     The tzset() function also sets the external variable daylight to 0
     if Daylight Savings Time conversions should never be applied for
     the time zone in use; otherwise non-zero. The external variable
     timezone is set to the difference, in seconds, between Coordinated
     Universal Time (UTC) and local standard time, for example:
     
                                TZ timezone
                                EST 5*60*60
                                GMT 0*60*60
                                JST -9*60*60
                                MET -1*60*60
                                MST 7*60*60
                                PST 8*60*60
                                      
     RETURN VALUE
    
     The tzset() function returns no value.
     
     ERRORS
    
     No errors are defined.
     
     EXAMPLES
    
     None.
     
     APPLICATION USAGE
    
     None.
     
     FUTURE DIRECTIONS
    
     None.
     
     SEE ALSO
    
     ctime(), localtime(), mktime(), strftime(), <time.h>.
     
    DERIVATION
    
     Derived from Issue 1 of the SVID.
     _________________________________________________________________

Regards,
Mumit

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019