Sha256: 3a22637a2292951a5be76b3be0968bf3b297e54467716990ea510b7887e250fd

Contents?: true

Size: 385 Bytes

Versions: 10

Compression:

Stored size: 385 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

10 entries across 10 versions & 1 rubygems

Version Path
forward-calendar-0.8.1 lib/forward_calendar/helper/time_as_utc.rb
forward-calendar-0.8.0 lib/forward_calendar/helper/time_as_utc.rb
forward-calendar-0.7.1 lib/forward_calendar/helper/time_as_utc.rb
forward-calendar-0.7.0 lib/forward_calendar/helper/time_as_utc.rb
forward-calendar-0.6.1 lib/forward_calendar/helper/time_as_utc.rb
forward-calendar-0.6.0 lib/forward_calendar/helper/time_as_utc.rb
forward-calendar-0.5.0 lib/forward_calendar/helper/time_as_utc.rb
forward-calendar-0.4.0 lib/forward_calendar/helper/time_as_utc.rb
forward-calendar-0.3.0 lib/forward_calendar/helper/time_as_utc.rb
forward-calendar-0.2.0 lib/forward_calendar/helper/time_as_utc.rb