]> xenbits.xensource.com Git - people/aperard/emesinae.git/commitdiff
Don't display 01/01/1970 date for non-present messages.
authorIan Campbell <ian.campbell@citrix.com>
Tue, 2 Jul 2013 13:55:08 +0000 (14:55 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 2 Jul 2013 15:21:37 +0000 (16:21 +0100)
Emesinae/CGI/Message.pm
Emesinae/Message.pm

index 3e1e30f59b0eee1da5a3127e0c1ccd888c71c435..8a26a0c6951a7dd8a79eee9afaaaef93f1932725 100644 (file)
@@ -188,7 +188,7 @@ sub format_html ($;$) {
                 hdr( "To",         $m->{to}->stringify ),
                 hdr( "Cc",         $m->{cc}->stringify ),
                 hdr( "Subject",    $m->{subject}->stringify ),
-                hdr( "Date",       $m->{date}->stringify ),
+                hdr( "Date",       $m->{date} ? $m->{date}->stringify : undef),
                 hdr( "Message-ID", $m->{msgid} )
             )
         )
index bca4c6f649b036e8782262d2b3e6979dcf3fb157..509d7eaff5a165b2507e61553cf3fd244e8620ad 100644 (file)
@@ -38,7 +38,7 @@ sub lookup_id {
         present  => $present eq "true",
         inserted => $inserted,
         msgtype  => $msgtype,
-        date     => Mail::Field::Date->new( 'date', $date ),
+        date     => $date ? Mail::Field::Date->new( 'date', $date ) : undef,
         from     => Mail::Field::AddrList->new( 'from', $from ),
         to       => Mail::Field::AddrList->new( 'to', $to ),
         cc       => Mail::Field::AddrList->new( 'cc', $cc ),
@@ -102,7 +102,7 @@ sub lookup_msgid {
         id       => $id,
         msgid    => $msgid,
         msgtype  => $msgtype,
-        date     => Mail::Field::Date->new( 'date', $date ),
+        date     => $date ? Mail::Field::Date->new( 'date', $date ) : undef,
         from     => Mail::Field::AddrList->new( 'from', $from ),
         to       => Mail::Field::AddrList->new( 'to', $to ),
         cc       => Mail::Field::AddrList->new( 'cc', $cc ),