make_expires(sec=nil)
public
Returns an expiry Time based on sec which
can be one of:
Numeric |
sec seconds into the future
|
true |
the expiry time is the start of 1970 (i.e. expired)
|
nil |
it is Tue Jan 19 03:14:07 GMT Standard Time 2038
(i.e. when
|
UNIX clocks will die)
Show source
def make_expires(sec=nil)
case sec
when Numeric
Time.now + sec
when true
Time.at(1)
when nil
Time.at(2**31-1)
end
end