Sha256: c03d117f23e54bddcc9d7b394af8ccf4d7e2b62e9527f339e2cf510b81593069

Contents?: true

Size: 386 Bytes

Versions: 2

Compression:

Stored size: 386 Bytes

Contents

# frozen_string_literal: true

require 'happymapper'
require 'active_support/time'

module ForwardCalendar
  module Helper
    class TimeAsUtc
      def self.parse(value)
        Time.find_zone('UTC').parse(value)
      end
    end
  end
end

HappyMapper::SupportedTypes.register_type(ForwardCalendar::Helper::TimeAsUtc) do |value|
  ForwardCalendar::Helper::TimeAsUtc.parse(value)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
forward-calendar-0.9.0 lib/forward_calendar/helper/time_as_utc.rb
forward-calendar-0.8.2 lib/forward_calendar/helper/time_as_utc.rb