(__tzfile_compute): Use negated value of offset for timezone

variable.
This commit is contained in:
Ulrich Drepper 1997-11-19 23:54:38 +00:00
parent cac8e36b1b
commit 43fa95836b
2 changed files with 4 additions and 4 deletions

View File

@ -420,7 +420,7 @@ __tzfile_compute (time_t timer, int use_localtime,
{
struct ttinfo *info = find_transition (timer);
__daylight = info->isdst;
__timezone = info->offset;
__timezone = -info->offset;
for (i = 0;
i < num_types && i < sizeof (__tzname) / sizeof (__tzname[0]);
++i)

View File

@ -18,7 +18,7 @@
#include <ctype.h>
#include <errno.h>
#include <bits/libc-lock.h>
#include <libc-lock.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
@ -543,7 +543,7 @@ tz_compute (timer, tm)
return 0;
__daylight = timer >= tz_rules[0].change && timer < tz_rules[1].change;
__timezone = tz_rules[__daylight ? 1 : 0].offset;
__timezone = -tz_rules[__daylight].offset;
__tzname[0] = (char *) tz_rules[0].name;
__tzname[1] = (char *) tz_rules[1].name;
@ -624,7 +624,7 @@ __tz_convert (const time_t *timer, int use_localtime, struct tm *tp)
{
tp->tm_isdst = __daylight;
tp->tm_zone = __tzname[__daylight];
tp->tm_gmtoff = __timezone;
tp->tm_gmtoff = -__timezone;
}
else
{