lib/aerospike/record.rb
def expiration_to_ttl(secs_from_epoc)
      if secs_from_epoc == 0
        Aerospike::TTL::NEVER_EXPIRE
      else
        now = Time.now.to_i - CITRUSLEAF_EPOCH
        # Record was not expired at server but if it looks expired at client
        # because of delay or clock differences, present it as not-expired.
        secs_from_epoc > now ? secs_from_epoc - now : 1
      end
    end
def expiration_to_ttl(secs_from_epoc)
      if secs_from_epoc == 0
        Aerospike::TTL::NEVER_EXPIRE
      else
        now = Time.now.to_i - CITRUSLEAF_EPOCH
        # Record was not expired at server but if it looks expired at client
        # because of delay or clock differences, present it as not-expired.
        secs_from_epoc > now ? secs_from_epoc - now : 1
      end
    end
Converts an absolute expiration time (in seconds from citrusleaf epoch)
 to relative time-to-live (TTL) in seconds