mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 08:11:08 +00:00
* time/tzfile.c (__tzfile_read): Handle the case where there are
transitions but no DST. 1999-03-20 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * time/tzfile.c (__tzfile_read): Handle the case where there are transitions but no DST.
This commit is contained in:
parent
e10cd1dc6a
commit
d16e36e0dc
@ -1,3 +1,8 @@
|
|||||||
|
1999-03-20 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
|
||||||
|
|
||||||
|
* time/tzfile.c (__tzfile_read): Handle the case where there are
|
||||||
|
transitions but no DST.
|
||||||
|
|
||||||
1999-03-20 Roland McGrath <roland@baalperazim.frob.com>
|
1999-03-20 Roland McGrath <roland@baalperazim.frob.com>
|
||||||
|
|
||||||
* mach/Machrules (extra-libs-others): Add $(interface-library) here
|
* mach/Machrules (extra-libs-others): Add $(interface-library) here
|
||||||
|
@ -311,16 +311,25 @@ __tzfile_read (const char *file)
|
|||||||
rule_stdoff = rule_dstoff = types[0].offset;
|
rule_stdoff = rule_dstoff = types[0].offset;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
int stdoff_set = 0, dstoff_set = 0;
|
||||||
rule_stdoff = rule_dstoff = 0;
|
rule_stdoff = rule_dstoff = 0;
|
||||||
for (i = 0; i < num_transitions; ++i)
|
for (i = 0; i < num_transitions; ++i)
|
||||||
{
|
{
|
||||||
if (!rule_stdoff && !types[type_idxs[i]].isdst)
|
if (!stdoff_set && !types[type_idxs[i]].isdst)
|
||||||
rule_stdoff = types[type_idxs[i]].offset;
|
{
|
||||||
if (!rule_dstoff && types[type_idxs[i]].isdst)
|
stdoff_set = 1;
|
||||||
rule_dstoff = types[type_idxs[i]].offset;
|
rule_stdoff = types[type_idxs[i]].offset;
|
||||||
if (rule_stdoff && rule_dstoff)
|
}
|
||||||
|
if (!dstoff_set && types[type_idxs[i]].isdst)
|
||||||
|
{
|
||||||
|
dstoff_set = 1;
|
||||||
|
rule_dstoff = types[type_idxs[i]].offset;
|
||||||
|
}
|
||||||
|
if (stdoff_set && dstoff_set)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (!dstoff_set)
|
||||||
|
rule_dstoff = rule_stdoff;
|
||||||
}
|
}
|
||||||
|
|
||||||
__daylight = rule_stdoff != rule_dstoff;
|
__daylight = rule_stdoff != rule_dstoff;
|
||||||
|
Loading…
Reference in New Issue
Block a user