class DateTime

def to_f

Converts +self+ to a floating-point number of seconds, including fractional microseconds, since the Unix epoch.
def to_f
  seconds_since_unix_epoch.to_f + sec_fraction
end