Sha256: ea9919901b8320a8537efcb829c2b4b554b63476fe9cf9fdac41eb4728af7fb7

Contents?: true

Size: 254 Bytes

Versions: 17

Compression:

Stored size: 254 Bytes

Contents

class Time
  def to_json(*a)
    %("#{strftime("%Y/%m/%d %H:%M:%S %z")}")
  end
  
  def self.json_create string
    return nil if string.nil?
    d = DateTime.parse(string).new_offset
    self.utc(d.year, d.month, d.day, d.hour, d.min, d.sec)
  end
end

Version data entries

17 entries across 17 versions & 3 rubygems

Version Path
andrewtimberlake-couch_potato-0.2.8.4 lib/core_ext/time.rb
langalex-couch_potato-0.2.11 lib/core_ext/time.rb
langalex-couch_potato-0.2.12 lib/core_ext/time.rb
couch_potato-0.2.25 lib/core_ext/time.rb
couch_potato-0.2.24 lib/core_ext/time.rb
couch_potato-0.2.23 lib/core_ext/time.rb
couch_potato-0.2.22 lib/core_ext/time.rb
couch_potato-0.2.21 lib/core_ext/time.rb
couch_potato-0.2.20 lib/core_ext/time.rb
couch_potato-0.2.19 lib/core_ext/time.rb
couch_potato-0.2.18 lib/core_ext/time.rb
couch_potato-0.2.17 lib/core_ext/time.rb
couch_potato-0.2.16 lib/core_ext/time.rb
couch_potato-0.2.15 lib/core_ext/time.rb
couch_potato-0.2.14 lib/core_ext/time.rb
couch_potato-0.2.13 lib/core_ext/time.rb
couch_potato-0.2.12 lib/core_ext/time.rb