Time.at(time) â time
Time.at(seconds_with_frac) â time
Time.at(seconds, microseconds_with_frac) â time
Time.at(seconds_with_frac) â time
Time.at(seconds, microseconds_with_frac) â time
Class Public methods
Creates a new Time object with the value given by
time
, the given number of seconds_with_frac
, or
seconds
and microseconds_with_frac
since the
Epoch. seconds_with_frac
and
microseconds_with_frac
can be an Integer, Float, Rational, or other Numeric. non-portable feature allows the offset to
be negative on some systems.
If a numeric argument is given, the result is in local time.
1 2 3 4 5 6 | 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 |
Please login to continue.