Sha256: ce8d1a0111c592c1c7cce876bfdc32f72a147bc72e094a5142eaea97bcb55ee1

Contents?: true

Size: 275 Bytes

Versions: 8

Compression:

Stored size: 275 Bytes

Contents

module FastshopCatalog

  class Time < Time
    def to_json(*a)
      date_serializer(self)
    end

    protected
    # .NET compatible formatter
    def date_serializer(datetime)
      "\"\\/Date(#{(datetime.to_f*1000).to_i}#{datetime.utc_offset})\\/\""
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fastshop_catalog-0.0.8 lib/fastshop_catalog/time.rb
fastshop_catalog-0.0.7 lib/fastshop_catalog/time.rb
fastshop_catalog-0.0.6 lib/fastshop_catalog/time.rb
fastshop_catalog-0.0.5 lib/fastshop_catalog/time.rb
fastshop_catalog-0.0.4 lib/fastshop_catalog/time.rb
fastshop_catalog-0.0.3 lib/fastshop_catalog/time.rb
fastshop_catalog-0.0.2 lib/fastshop_catalog/time.rb
fastshop_catalog-0.0.1 lib/fastshop_catalog/time.rb