apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: apr/time/unix time.c
Date Mon, 05 Nov 2001 20:02:58 GMT
bnicholes    01/11/05 12:02:58

  Modified:    time/unix time.c
  Log:
  Added an initialization routine for NetWare and daylight savings handling
  
  Revision  Changes    Path
  1.57      +18 -1     apr/time/unix/time.c
  
  Index: time.c
  ===================================================================
  RCS file: /home/cvs/apr/time/unix/time.c,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- time.c	2001/11/02 23:28:19	1.56
  +++ time.c	2001/11/05 20:02:58	1.57
  @@ -84,6 +84,15 @@
   #elif defined(HAVE___OFFSET)
       return tm->__tm_gmtoff;
   #else
  +#ifdef NETWARE
  +    /* Need to adjust the global variable each time otherwise
  +        the web server would have to be restarted when daylight
  +        savings changes.
  +    */
  +    if (daylightOnOff) {
  +        return server_gmt_offset + daylightOffset;
  +    }
  +#endif
       return server_gmt_offset;
   #endif
   }
  @@ -156,7 +165,7 @@
   
   APR_DECLARE(apr_status_t) apr_explode_localtime(apr_exploded_time_t *result, apr_time_t
input)
   {
  -#if defined(__EMX__) || defined(NETWARE)
  +#if defined(__EMX__)
       /* EMX gcc (OS/2) has a timezone global we can use */
       return apr_explode_time(result, input, -timezone);
   #else
  @@ -342,3 +351,11 @@
       server_gmt_offset = (apr_int32_t) difftime(t1, t2) + (was_dst ? 3600 : 0);
   #endif
   }
  +
  +#ifdef NETWARE
  +APR_DECLARE(void) apr_netware_setup_time(void)
  +{
  +    tzset();
  +    server_gmt_offset = -timezone;
  +}
  +#endif
  
  
  

Mime
View raw message