class Net::IMAP

def self.decode_time(string)

Same as +decode_datetime+, but returning a Time instead.

Decodes +string+ as an IMAP4 formatted "date-time".

:call-seq: decode_time(string) -> Time
def self.decode_time(string)
  unless string.start_with?(?") && string.end_with?(?")
    string = '"%s"' % [string]
  end
  Time.strptime(string, STRFTIME)
end