Sha256: ddece4c57195cfbc7807a028300a50b2c8c2d79f313958573906149cfc7ad401

Contents?: true

Size: 268 Bytes

Versions: 7

Compression:

Stored size: 268 Bytes

Contents

class Time
  def to_json(*a)
    self.utc
    %("#{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

7 entries across 7 versions & 1 rubygems

Version Path
couch_tomato-0.2.0 lib/core_ext/time.rb
couch_tomato-0.1.5 lib/core_ext/time.rb
couch_tomato-0.1.4 lib/core_ext/time.rb
couch_tomato-0.1.3 lib/core_ext/time.rb
couch_tomato-0.1.2 lib/core_ext/time.rb
couch_tomato-0.1.1 lib/core_ext/time.rb
couch_tomato-0.1.0 lib/core_ext/time.rb