lib/openwfe/util/otime.rb in openwferu-0.9.4 vs lib/openwfe/util/otime.rb in openwferu-0.9.5
- old
+ new
@@ -182,16 +182,37 @@
s = time.sec + Rational(time.usec, 10**6)
o = Rational(time.utc_offset, 3600 * 24)
begin
+
return DateTime.new(
- time.year, time.month, time.day, time.hour, time.min, s, o)
+ time.year,
+ time.month,
+ time.day,
+ time.hour,
+ time.min,
+ s,
+ o)
+
rescue Exception => e
- puts \
- "\n Date.new() problem. Params :"+
- "\n....y:#{time.year} M:#{time.month} d:#{time.day} "+
- "h:#{time.hour} m:#{time.min} s:#{s} o:#{o}"
+
+ #puts
+ #puts OpenWFE::exception_to_s(e)
+ #puts
+ #puts \
+ # "\n Date.new() problem. Params :"+
+ # "\n....y:#{time.year} M:#{time.month} d:#{time.day} "+
+ # "h:#{time.hour} m:#{time.min} s:#{s} o:#{o}"
+
+ return DateTime.new(
+ time.year,
+ time.month,
+ time.day,
+ time.hour,
+ time.min,
+ time.sec,
+ time.utc_offset)
end
end
def OpenWFE.to_gm_time (dtime)
to_ttime(dtime.new_offset, :gm)