Module: Golden::DateTimeAccessor
- Extended by:
- ActiveSupport::Concern
- Included in:
- ApplicationContext, ApplicationForm, ApplicationTransformer
- Defined in:
- lib/golden/attribute_accessors/date_time_accessor.rb
Instance Method Summary collapse
Instance Method Details
#parse_time(string, zone: Golden::AttributeAccessors.default_zone) ⇒ Object
46 47 48 49 50 |
# File 'lib/golden/attribute_accessors/date_time_accessor.rb', line 46 def parse_time(string, zone: Golden::AttributeAccessors.default_zone) ActiveSupport::TimeZone.new(zone)&.parse(string) rescue StandardError nil end |