[kmail2] [Bug 340260] Kmail composer's template ODATE/ODATESHORT renders incorrect dates.

Cezary Statkiewicz cezio at thelirium.net
Fri Oct 24 10:38:44 BST 2014


https://bugs.kde.org/show_bug.cgi?id=340260

--- Comment #4 from Cezary Statkiewicz <cezio at thelirium.net> ---
I've attached original date in samples already. Here's your last comment:
----
Return-Path: <bugzilla_noreply at kde.org>
Delivered-To: cezio at thelirium.net
Received: from bugs.kde.org (bugs.kde.org [5.9.99.188])
    (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
    (No client certificate requested)
    by ks388619.kimsufi.com (Postfix) with ESMTPS id 64641801F6
    for <cezio at thelirium.net>; Fri, 24 Oct 2014 11:09:04 +0200 (CEST)
Received: from www-data by bugs.kde.org with local (Exim 4.82)
    (envelope-from <bugzilla_noreply at kde.org>)
    id 1Xhaqw-0003O3-0E
    for cezio at thelirium.net; Fri, 24 Oct 2014 09:08:10 +0000
From: Laurent Montel <montel at kde.org>
Sender: bugzilla_noreply at kde.org
To: cezio at thelirium.net
Subject: [kmail2] [Bug 340260] Kmail composer's template ODATE/ODATESHORT
 renders incorrect dates.
Date: Fri, 24 Oct 2014 09:08:09 +0000
Reply-To: bug-control at bugs.kde.org
X-Bugzilla-Reason: Reporter
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: kmail2
X-Bugzilla-Component: composer
X-Bugzilla-Version: 4.14.1
X-Bugzilla-Keywords: 
X-Bugzilla-Severity: normal
X-Bugzilla-Who: montel at kde.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: NOR
X-Bugzilla-Assigned-To: kdepim-bugs at kde.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: 
Message-ID: <bug-340260-188988-w2HmLaB60R at http.bugs.kde.org/>
In-Reply-To: <bug-340260-188988 at http.bugs.kde.org/>
References: <bug-340260-188988 at http.bugs.kde.org/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://bugs.kde.org/
Auto-Submitted: auto-generated
MIME-Version: 1.0

https://bugs.kde.org/show_bug.cgi?id=340260

--- Comment #3 from Laurent Montel <montel at kde.org> ---
Please paste or attach an exact message here please.

Because ODATE == original date
see code:
"
            } else if ( cmd.startsWith( QLatin1String( "ODATE" ) ) ) {
                kDebug() << "Command: ODATE";
                i += strlen( "ODATE" );
                if ( mOrigMsg ) {
                    const QDateTime date =
mOrigMsg->date()->dateTime().dateTime();
                    const QString str = KGlobal::locale()->formatDate(
date.date(), KLocale::LongDate );
                    plainBody.append( str );
                    const QString body = plainToHtml( str );
                    htmlBody.append( body );
                }
"
=> it will take date from original message.

So I need to have a exact message for testing it.
For me code is ok.

I don't understand how it can take another date.
Template uses currentDate => %DATE or original date %ODATE

Regards

-- 
You are receiving this mail because:
You reported the bug.

---

And here's rendered response beginning:

---
On Friday 11 October 2014 11/10/2014 09:08:09 09:08 Laurent Montel wrote:
> https://bugs.kde.org/show_bug.cgi?id=340260
> 
> --- Comment #3 from Laurent Montel <montel at kde.org> ---
> Please paste or attach an exact message here please.
> 
----

As you probably noticed, Date rendered is incorrect. Should be 24th Oct, and
it's 11th Oct. 

Here's also my template:

----
%REM="Default reply all template"%-
On %ODATE %ODATESHORT %OTIMELONG %OTIME %OFROMNAME wrote:
%QUOTE
%CURSOR
----

> I don't understand how it can take another date.
> Template uses currentDate => %DATE or original date %ODATE

Maybe date is parsed incorrectly? But from the other hand, Message date is
displayed correctly in message list and in message view. Also, date skew seems
to be constant, 13 days.

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Kdepim-bugs mailing list