method

at

v1_9_2_180 - Show latest stable - Class: Time
at(p1, p2 = v2)
public

Creates a new time object with the value given by time, the given number of seconds_with_frac, or seconds and microseconds_with_frac from the Epoch. seconds_with_frac and microseconds_with_frac can be Integer, Float, Rational, or other Numeric. non-portable feature allows the offset to be negative on some systems.

Time.at(0)            #=> 1969-12-31 18:00:00 -0600
Time.at(Time.at(0))   #=> 1969-12-31 18:00:00 -0600
Time.at(946702800)    #=> 1999-12-31 23:00:00 -0600
Time.at(-284061600)   #=> 1960-12-31 00:00:00 -0600
Time.at(946684800.2).usec #=> 200000
Time.at(946684800, 123456.789).nsec #=> 123456789