[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[UDUNITS #VZB-644403]: Bug in deprecated udunits 1.12.9
- Subject: [UDUNITS #VZB-644403]: Bug in deprecated udunits 1.12.9
- Date: Mon, 12 Sep 2011 15:07:09 -0600
Hi Christian,
[Sorry for taking so long to respond. I was on holiday.]
> The code needs to be modified slightly to ensure that if conditions are met .
> If not the double precision very small leftovers are interfering and
> prevents the code to go into the if condition when needed.
>
> In unitcore.c, line 536, adding:
>
> if ((float)seconds >= 60.0) {
> seconds = 0.0;
> if ((float)++minutes >= 60) {
> minutes = 0.0;
> if ((float)++hours >= 24) {
> hours = 0.0;
> days++;
> }
> }
> }
> else if ((float)minutes >= 60) {
> minutes = 0.0;
> if ((float)++hours >= 24) {
> hours = 0.0;
> days++;
> }
> }
> else if ((float)hours >= 24) {
> hours = 0.0;
> days++;
> }
I copied the improvements from the UDUNITS-1 to the UDUNITS-2 code and made a
new release (2.1.24).
Thanks for reporting this.
> Christian
Regards,
Steve Emmerson
Ticket Details
===================
Ticket ID: VZB-644403
Department: Support UDUNITS
Priority: Normal
Status: Closed