<div class="markdown">
<p dir="auto">On 23 Sep 2014, at 15:35, Alexander Kucera wrote:</p>
<blockquote>
<p dir="auto">I have a test email whose raw headers show the date as <code>Date: Tue, 23 Sep 2014 13:03:13 +0000</code> which is what is written into the variable I get from MailMate. However I live in UTC+2 so the time I should be putting into the log is <code>15:03:13</code>.</p>
<p dir="auto">MailMate displays this correctly in the UI, but passes the raw time value to the bundle, which is fine I guess, but I am unable to convert in in any way that makes sense due to a lack of Ruby/programming knowledge.</p>
<p dir="auto">A little help please?</p>
</blockquote>
<p dir="auto">You should pass the virtual <code>#date</code> value instead of the raw date of the message. That way you'll leave it to MailMate to generate a canonically formatted date instead of the numerous badly formatted dates used in emails.</p>
<p dir="auto">After that, you can probably make Ruby parse it and format it in any way you like (I haven't checked how this works in Ruby). On the command line, you can do it like this:</p>
<pre><code>date -j -f "%Y-%m-%d %T %z" "2014-01-01 10:10:10 +0000" "+%a %b %d %T %Y"
</code></pre>
<p dir="auto">The format strings are described in <code>man strftime</code>.</p>
<p dir="auto">-- <br>
Benny</p>
</div>