DateTime.sec_fraction and day_fraction_to_time return incorr

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

e$B$U$J$P$5$s$,8+$F$i$C$7$c$k$h$&[email protected]$+$iJ9$$$F$*$3$&!#e(B
[ruby-core:08512]e$B$Ke(B

require ‘date’
t = DateTime.parse(‘2006-08-03 14:22:44.500’)
p t.to_s
puts t.sec => 44
puts t.sec_fraction => 1/172800

e$B$H$J$j!"e(Bsec_fractione$B$,IC$KBP$9$kHf$G$O$J$/!"F|$KBP$9$kHf$G$"e(B
e$B$k$H$$$&%l%]!<%H$,Mh$F$^$9!#$3$l$O0U?^$7$?$b$N$J$s$G$7$g$&$+!#e(B

e$B$U$J$P$G$9!#e(B

[ruby-core:08512]e$B$Ke(B

require ‘date’
t = DateTime.parse(‘2006-08-03 14:22:44.500’)
p t.to_s
puts t.sec => 44
puts t.sec_fraction => 1/172800

e$B$H$J$j!"e(Bsec_fractione$B$,IC$KBP$9$kHf$G$O$J$/!"F|$KBP$9$kHf$G$"e(B
e$B$k$H$$$&%l%]!<%H$,Mh$F$^$9!#$3$l$O0U?^$7$?$b$N$J$s$G$7$g$&$+!#e(B

e$B$=$&$G$9!#$,!"$=$&;W$o$J$$?M$,$$$k$H$$$&$3$H$O!"L>A0$,$h$/$J$+$C$?$G$9e(B
e$B$+$M!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs