mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-01 05:13:06 +02:00
gtimezone: fix inverted ignore_leap param parsing julian day
The callers of parse_tz_boundary inverted the value passed for the ignore_leap parameter. Fortunately the method impl also had an inverted test cancelling out the first bug. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
9ed4b813e5
commit
6cd263f655
@ -1234,7 +1234,7 @@ parse_julian_boundary (gchar** pos, TimeZoneDate *boundary,
|
|||||||
boundary->mday = (int) g_date_get_day (&date);
|
boundary->mday = (int) g_date_get_day (&date);
|
||||||
boundary->wday = 0;
|
boundary->wday = 0;
|
||||||
|
|
||||||
if (!ignore_leap && day >= 59)
|
if (ignore_leap && day >= 59)
|
||||||
boundary->mday++;
|
boundary->mday++;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1258,13 +1258,13 @@ parse_tz_boundary (const gchar *identifier,
|
|||||||
else if (*pos == 'J')
|
else if (*pos == 'J')
|
||||||
{
|
{
|
||||||
++pos;
|
++pos;
|
||||||
if (!parse_julian_boundary (&pos, boundary, FALSE))
|
if (!parse_julian_boundary (&pos, boundary, TRUE))
|
||||||
return FALSE ;
|
return FALSE ;
|
||||||
}
|
}
|
||||||
/* Julian date which counts Feb 29 in leap years */
|
/* Julian date which counts Feb 29 in leap years */
|
||||||
else if (*pos >= '0' && '9' >= *pos)
|
else if (*pos >= '0' && '9' >= *pos)
|
||||||
{
|
{
|
||||||
if (!parse_julian_boundary (&pos, boundary, TRUE))
|
if (!parse_julian_boundary (&pos, boundary, FALSE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user