[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UDUNITS #FQG-435699]: Problem with ut_decode_time



Molly,

> Thanks for the followup Steve - I'm just getting some data out from a
> test case for you right now.
> 
> I am running against version 2.2.24 on the Summit supercomputer at CU.
> The RC staff installed that version for me - I think I was using 2.2.21
> prior to this.
> 
> My code first calls ut_encode_time with this set of arguments:-
> 
> 2000 year, 12 month, 31 day, 1386 tb_minutes, 0.000000 second

What's "1386 tb_minutes"?

> and I get a returned double of  -3240.000000
> 
> Next I call ut_decode_time with input of -3240.000000 and this is what I
> get back:-
> 
> 2000 year, 12 month, 31 day, 23 hour, 5 minute, 60.000000 second,
> 0.000000 resolution

I called ut_decode_time() with a value of -3240.000000 and got
    year=2000
    month=12
    day=31
    hour=23
    minute=5
    seconds=59.999999999998778
    resolution=3.5971225997855072e-13

It looks like your code might be rounding to the nearest integer.

Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: FQG-435699
Department: Support UDUNITS
Priority: Urgent
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.



NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.