Skip to content

Instantly share code, notes, and snippets.

@larcara
Created February 9, 2017 08:46
Show Gist options
  • Save larcara/feb1bffb2d61a627b9f82c013527a8c8 to your computer and use it in GitHub Desktop.
Save larcara/feb1bffb2d61a627b9f82c013527a8c8 to your computer and use it in GitHub Desktop.
Mail gem CEDT parse error
require "mail"
mail = Mail.new do
from 'me@test.lindsaar.net'
to 'you@test.lindsaar.net'
subject 'Here is the image you wanted'
date '06-Jul-2016 09:32:29 CEDT'
end
puts mail.date #2016-07-06T09:32:29+00:00
mail.date = Time.parse( mail["Date"].instance_variable_get("@value"))
puts "###### HACK"
puts mail.date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment