Thread: BUG #12428: Incorrect Code

BUG #12428: Incorrect Code

From
honey@internot.info
Date:
The following bug has been logged on the website:

Bug reference:      12428
Logged by:          Joshua Rogers
Email address:      honey@internot.info
PostgreSQL version: 9.4.0
Operating system:   Ubuntu 14.04
Description:

Hi,

In /src/timezone/zic.c:

2091        if (stringrule(result, stdrp, dstrp->r_stdoff, zp->z_gmtoff) !=
0)

Should it not be

2091        if (stringrule(result, stdrp, >>stdp->r_stdoff<<, zp->z_gmtoff)
!= 0)

(<< >> added to denote change)

Looks like a copy 'n paste error.


Thanks,

Re: BUG #12428: Incorrect Code

From
Tom Lane
Date:
honey@internot.info writes:
> In /src/timezone/zic.c:
> 2091        if (stringrule(result, stdrp, dstrp->r_stdoff, zp->z_gmtoff) != 0)
> Should it not be
> 2091        if (stringrule(result, stdrp, >>stdp->r_stdoff<<, zp->z_gmtoff) != 0)

I wouldn't assume that ... it's still that way in tzcode2014j,
so if this is a bug you need to report it to upstream not us.  See
http://www.iana.org/time-zones

            regards, tom lane