Sha256: 3fb17d1b6725c06274f6d3bb9149891c0870718e599196e1a86d4ac7bd86eb08

Contents?: true

Size: 272 Bytes

Versions: 3

Compression:

Stored size: 272 Bytes

Contents

#!/usr/bin/env ruby

module Djb
  module Tai64n
    # Thanks.
    # http://d.hatena.ne.jp/unageanu/20091207
    def self.to_local tai
      raise "illegal format" unless tai =~ /\@40000000([\da-f]{8})([\da-f]{8})/
      Time.at($1.hex-10, $2.hex/1000.0)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
multilog-collector-0.3.1 lib/djb/tai64n.rb
multilog-collector-0.3.0 lib/djb/tai64n.rb
multilog-collector-0.2.0 lib/djb/tai64n.rb