Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Changeset 1072

Show
Ignore:
Timestamp:
11/28/03 14:31:20 (5 years ago)
Author:
nahi
Message:

* an oldtype man like (v + 0.5).to_i thing... Use Rational#round instead.

thanks to nokada-san aka PatchMonster?.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/xsd/datatypes.rb

    r1068 r1072  
    478478      if @data.offset * SecInDay == Time.now.utc_offset 
    479479        d = @data 
    480         usec = ((d.sec_fraction * SecInDay * 1000000) + 0.5).to_i 
     480        usec = (d.sec_fraction * SecInDay * 1000000).round 
    481481        Time.local(d.year, d.month, d.mday, d.hour, d.min, d.sec, usec) 
    482482      else 
    483483        d = @data.newof 
    484         usec = ((d.sec_fraction * SecInDay * 1000000) + 0.5).to_i 
     484        usec = (d.sec_fraction * SecInDay * 1000000).round 
    485485        Time.gm(d.year, d.month, d.mday, d.hour, d.min, d.sec, usec) 
    486486      end