method

to_datetime

v1_9_1_378 - Show latest stable - Class: Time
to_datetime()
public

No documentation available.

# File lib/date.rb, line 1775
  def to_datetime
    jd = DateTime.__send__(:civil_to_jd, year, mon, mday, DateTime::ITALY)
    fr = DateTime.__send__(:time_to_day_fraction, hour, min, [sec, 59].min) +
      Rational(nsec, 86400_000_000_000)
    of = Rational(utc_offset, 86400)
    DateTime.new!(DateTime.__send__(:jd_to_ajd, jd, fr, of),
                  of, DateTime::ITALY)
  end