We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1520e01 commit 94376faCopy full SHA for 94376fa
1 file changed
app/services/email_ingestor.rb
@@ -348,6 +348,14 @@ def add_mentions(msg, users)
348
def sanitize_email_date(mail_date, mail_date_header, message_id)
349
return mail_date if mail_date.nil?
350
351
+ unless mail_date.respond_to?(:utc)
352
+ begin
353
+ mail_date = Time.parse(mail_date.to_s)
354
+ rescue ArgumentError, TypeError
355
+ return Time.parse("2000-01-01 00:00:00 UTC")
356
+ end
357
358
+
359
current_time_utc = Time.now.utc
360
mail_date_utc = mail_date.utc
361
min_valid_date = Time.parse("1996-01-01 00:00:00 UTC")
0 commit comments