diff options
author | bnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68> | 2001-11-05 20:02:58 +0000 |
---|---|---|
committer | bnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68> | 2001-11-05 20:02:58 +0000 |
commit | 55e004a4542b3c7b317f0c74ec8b73fee15f3ed1 (patch) | |
tree | 97a76966ce3314056f09d2fe9e0b694ac67bed81 /time | |
parent | 62caa1003933d7bf6efaff3dfc72fd281f702696 (diff) | |
download | libapr-55e004a4542b3c7b317f0c74ec8b73fee15f3ed1.tar.gz |
Added an initialization routine for NetWare and daylight savings handling
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62490 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'time')
-rw-r--r-- | time/unix/time.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/time/unix/time.c b/time/unix/time.c index 463101127..f81d62680 100644 --- a/time/unix/time.c +++ b/time/unix/time.c @@ -84,6 +84,15 @@ static apr_int32_t get_offset(struct tm *tm) #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_gmt(apr_exploded_time_t *result, apr_time_ 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 @@ APR_DECLARE(void) apr_unix_setup_time(void) 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 |