lib/ulid/generate.rb
# THIS IS CORRECT (to the ULID spec)
THIS IS CORRECT (to the ULID spec)
THIS IS CORRECT ( to the ULID spec )
def time_bytes
      id = []
      t = millisecond_time
      id << [t >> 40].pack('c')
      id << [t >> 32].pack('c')
      id << [t >> 24].pack('c')
      id << [t >> 16].pack('c')
      id << [t >> 8].pack('c')
      id << [t].pack('c')
      id.join
    end
def time_bytes id = [ ] t = millisecond_time id << [ t >> 40 ] . pack ( 'c' ) id << [ t >> 32 ] . pack ( 'c' ) id << [ t >> 24 ] . pack ( 'c' ) id << [ t >> 16 ] . pack ( 'c' ) id << [ t >> 8 ] . pack ( 'c' ) id << [ t ] . pack ( 'c' ) id . join end
THIS IS CORRECT (to the ULID spec)
THIS IS CORRECT ( to the ULID spec )
# via https://github.com/oklog/ulid/blob/c3c01856f7e43fa64133819126887124d5f05e39/ulid.go#L295