module XRBP

Constants

GENESIS_TIME

Genesis Ledger: wiki.ripple.com/Genesis_ledger

Created on 2013-01-01 data.ripple.com/v2/ledgers/32570

VERSION

Public Class Methods

from_xrp_time(xrp_time) click to toggle source

Convert XRP Ledger time to local time

# File lib/xrbp/common.rb, line 12
def self.from_xrp_time(xrp_time)
  return nil if xrp_time.nil?
  Time.at(xrp_time + 946684800)
end
to_xrp_time(local_time) click to toggle source

Convert local time to XRP Time

# File lib/xrbp/common.rb, line 18
def self.to_xrp_time(local_time)
  return nil if local_time.nil?
  local_time.to_i - 946684800
end