Sha256: 9d1bd001b6e5c17c4ff339cd6cb248beda1b5a369155c62b1a9f3842b7a950ae

Contents?: true

Size: 257 Bytes

Versions: 16

Compression:

Stored size: 257 Bytes

Contents

class Time
  def to_json(*a)
    %("#{strftime("%Y/%m/%d %H:%M:%S +0000")}")
  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

16 entries across 16 versions & 4 rubygems

Version Path
andrewtimberlake-couch_potato-0.2.8.1 lib/core_ext/time.rb
andrewtimberlake-couch_potato-0.2.8.2 lib/core_ext/time.rb
andrewtimberlake-couch_potato-0.2.8.3 lib/core_ext/time.rb
langalex-couch_potato-0.2.0 lib/core_ext/time.rb
langalex-couch_potato-0.2.1 lib/core_ext/time.rb
langalex-couch_potato-0.2.2 lib/core_ext/time.rb
langalex-couch_potato-0.2.3 lib/core_ext/time.rb
langalex-couch_potato-0.2.4 lib/core_ext/time.rb
langalex-couch_potato-0.2.5 lib/core_ext/time.rb
langalex-couch_potato-0.2.6 lib/core_ext/time.rb
langalex-couch_potato-0.2.7 lib/core_ext/time.rb
langalex-couch_potato-0.2.8 lib/core_ext/time.rb
langalex-couch_potato-0.2.9 lib/core_ext/time.rb
speedmax-couch_potato-0.2.0 lib/core_ext/time.rb
speedmax-couch_potato-0.2.2 lib/core_ext/time.rb
thefool808-couch_potato-0.2.7 lib/core_ext/time.rb