OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [newlib-1.18.0/] [newlib-1.18.0-or32-1.0rc1/] [newlib/] [libc/] [time/] [tzset.c] - Diff between revs 207 and 345

Only display areas with differences | Details | Blame | View Log

Rev 207 Rev 345
/*
/*
FUNCTION
FUNCTION
<<tzset>>---set timezone characteristics from TZ environment variable
<<tzset>>---set timezone characteristics from TZ environment variable
 
 
INDEX
INDEX
        tzset
        tzset
INDEX
INDEX
        _tzset_r
        _tzset_r
 
 
ANSI_SYNOPSIS
ANSI_SYNOPSIS
        #include <time.h>
        #include <time.h>
        void tzset(void);
        void tzset(void);
        void _tzset_r (struct _reent *);
        void _tzset_r (struct _reent *);
 
 
TRAD_SYNOPSIS
TRAD_SYNOPSIS
        #include <time.h>
        #include <time.h>
        void tzset();
        void tzset();
        void _tzset_r (reent_ptr)
        void _tzset_r (reent_ptr)
        struct _reent *reent_ptr;
        struct _reent *reent_ptr;
 
 
DESCRIPTION
DESCRIPTION
<<tzset>> examines the TZ environment variable and sets up the three
<<tzset>> examines the TZ environment variable and sets up the three
external variables: <<_timezone>>, <<_daylight>>, and <<tzname>>.  The
external variables: <<_timezone>>, <<_daylight>>, and <<tzname>>.  The
value of <<_timezone>> shall be the offset from the current time zone
value of <<_timezone>> shall be the offset from the current time zone
to GMT.  The value of <<_daylight>> shall be 0 if there is no daylight
to GMT.  The value of <<_daylight>> shall be 0 if there is no daylight
savings time for the current time zone, otherwise it will be non-zero.
savings time for the current time zone, otherwise it will be non-zero.
The <<tzname>> array has two entries: the first is the name of the
The <<tzname>> array has two entries: the first is the name of the
standard time zone, the second is the name of the daylight-savings time
standard time zone, the second is the name of the daylight-savings time
zone.
zone.
 
 
The TZ environment variable is expected to be in the following POSIX
The TZ environment variable is expected to be in the following POSIX
format:
format:
 
 
  stdoffset1[dst[offset2][,start[/time1],end[/time2]]]
  stdoffset1[dst[offset2][,start[/time1],end[/time2]]]
 
 
where: std is the name of the standard time-zone (minimum 3 chars)
where: std is the name of the standard time-zone (minimum 3 chars)
       offset1 is the value to add to local time to arrive at Universal time
       offset1 is the value to add to local time to arrive at Universal time
         it has the form:  hh[:mm[:ss]]
         it has the form:  hh[:mm[:ss]]
       dst is the name of the alternate (daylight-savings) time-zone (min 3 chars)
       dst is the name of the alternate (daylight-savings) time-zone (min 3 chars)
       offset2 is the value to add to local time to arrive at Universal time
       offset2 is the value to add to local time to arrive at Universal time
         it has the same format as the std offset
         it has the same format as the std offset
       start is the day that the alternate time-zone starts
       start is the day that the alternate time-zone starts
       time1 is the optional time that the alternate time-zone starts
       time1 is the optional time that the alternate time-zone starts
         (this is in local time and defaults to 02:00:00 if not specified)
         (this is in local time and defaults to 02:00:00 if not specified)
       end is the day that the alternate time-zone ends
       end is the day that the alternate time-zone ends
       time2 is the time that the alternate time-zone ends
       time2 is the time that the alternate time-zone ends
         (it is in local time and defaults to 02:00:00 if not specified)
         (it is in local time and defaults to 02:00:00 if not specified)
 
 
Note that there is no white-space padding between fields.  Also note that
Note that there is no white-space padding between fields.  Also note that
if TZ is null, the default is Universal GMT which has no daylight-savings
if TZ is null, the default is Universal GMT which has no daylight-savings
time.  If TZ is empty, the default EST5EDT is used.
time.  If TZ is empty, the default EST5EDT is used.
 
 
The function <<_tzset_r>> is identical to <<tzset>> only it is reentrant
The function <<_tzset_r>> is identical to <<tzset>> only it is reentrant
and is used for applications that use multiple threads.
and is used for applications that use multiple threads.
 
 
RETURNS
RETURNS
There is no return value.
There is no return value.
 
 
PORTABILITY
PORTABILITY
<<tzset>> is part of the POSIX standard.
<<tzset>> is part of the POSIX standard.
 
 
Supporting OS subroutine required: None
Supporting OS subroutine required: None
*/
*/
 
 
#include <_ansi.h>
#include <_ansi.h>
#include <reent.h>
#include <reent.h>
#include <time.h>
#include <time.h>
#include "local.h"
#include "local.h"
 
 
_VOID
_VOID
_DEFUN_VOID (tzset)
_DEFUN_VOID (tzset)
{
{
  _tzset_r (_REENT);
  _tzset_r (_REENT);
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.