lib/time_crisis/support/conversions.rb in time_crisis-0.1.8 vs lib/time_crisis/support/conversions.rb in time_crisis-0.2.0

- old
+ new

@@ -75,9 +75,13 @@ def to_date ::Date.civil(year, month, day) end + def to_datetime + ::DateTime.civil(year, month, day, hour, minute, second, Rational(offset, 86400)) + end + def to_time ::Time.at(strftime('%s').to_i) end end