Method: Html2rss::AttributePostProcessors::ParseTime#get

Defined in:
lib/html2rss/attribute_post_processors/parse_time.rb

#getString

Converts the provided time string to RFC822 format, taking into account the time_zone.

Returns:

  • (String)

    RFC822 formatted time

Raises:

  • (TZInfo::InvalidTimezoneIdentifier)

    if the configured time zone is invalid

[View source]

39
40
41
42
43
# File 'lib/html2rss/attribute_post_processors/parse_time.rb', line 39

def get
  time_zone = context[:config].time_zone

  Utils.use_zone(time_zone) { Time.parse(value).rfc822 }
end