Sha256: ec5a3a2dbc2dd9871d2f2a031bf056483ebb2cf1a167ad2ea143cd252f77e0e0

Contents?: true

Size: 244 Bytes

Versions: 11

Compression:

Stored size: 244 Bytes

Contents

require "active_record/type"
class FionaDateTime < ActiveRecord::Type::Time
  def type
    :fiona_datetime
  end

  def serialize(value)
    value&.to_iso
  end

  def deserialize(value)
    Time.from_iso(value).in_time_zone if value
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
infopark_fiona_connector-7.0.1.6.1.6.rc4 lib/rails_connector/fiona_date_time.rb
infopark_fiona_connector-7.0.1.6.1.6.rc3 lib/rails_connector/fiona_date_time.rb
infopark_fiona_connector-7.0.1.6.1.6.rc2 lib/rails_connector/fiona_date_time.rb
infopark_fiona_connector-7.0.1.6.1.6.rc1 lib/rails_connector/fiona_date_time.rb
infopark_fiona_connector-7.0.1.5.2.7.rc1 lib/rails_connector/fiona_datetime.rb
infopark_fiona_connector-7.0.1.5.2.4.rc2 lib/rails_connector/fiona_datetime.rb
infopark_fiona_connector-7.0.1.5.2.4.rc1 lib/rails_connector/fiona_datetime.rb
infopark_fiona_connector-7.0.1.5.2.3.rc8 lib/rails_connector/fiona_datetime.rb
infopark_fiona_connector-7.0.1.5.2.3.rc7 lib/rails_connector/fiona_datetime.rb
infopark_fiona_connector-7.0.1.5.2.3.rc6 lib/rails_connector/fiona_datetime.rb
infopark_fiona_connector-7.0.1.5.2.3.rc5 lib/rails_connector/fiona_datetime.rb