summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-08-26 21:35:51 (GMT)
committerMontel Laurent <montel@kde.org>2016-08-26 21:35:51 (GMT)
commitd6347ae7c27d3b895727a4124bed61dc241204d7 (patch)
treed5a592c4b039464db476a8d0624749b185ee1a84
parentbd9f439d46ec0ca21fdac7834c7f2d5a6e8e1560 (diff)
Store as qdate only
-rw-r--r--autotests/customidentifiertest.cpp2
-rw-r--r--autotests/importexportvcardtest.cpp2
-rw-r--r--src/vcardtool.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/autotests/customidentifiertest.cpp b/autotests/customidentifiertest.cpp
index 70d93e2..00a12f2 100644
--- a/autotests/customidentifiertest.cpp
+++ b/autotests/customidentifiertest.cpp
@@ -110,7 +110,7 @@ void CustomIdentifierTest::shouldExportVcard4()
ba = vcard.exportVCards(lst, KContacts::VCard::v4_0);
expected = QByteArray("BEGIN:VCARD\r\n"
"VERSION:4.0\r\n"
- "ANNIVERSARY:00120903T000000\r\n"
+ "ANNIVERSARY:00120903\r\n"
"EMAIL:foo@kde.org\r\n"
"EMAIL:bla@kde.org\r\n"
"N:;;;;\r\n"
diff --git a/autotests/importexportvcardtest.cpp b/autotests/importexportvcardtest.cpp
index 6ea5899..ce310ab 100644
--- a/autotests/importexportvcardtest.cpp
+++ b/autotests/importexportvcardtest.cpp
@@ -73,7 +73,7 @@ void ImportExportVCardTest::shouldExportFullTestVcard4()
"VERSION:4.0\r\n"
"ADR;GEO=\"geo:51.523701,0.158500\";LABEL=\"Mr Sherlock Holmes\";TYPE:;;221B Bak\r\n"
" er Street;London;;NW1;United Kingdom\r\n"
- "ANNIVERSARY:19960415T000000\r\n"
+ "ANNIVERSARY:19960415\r\n"
"BDAY:19531015T231000Z\r\n"
"CALADRURI;PREF=1:mailto:detective@sherlockholmes.com\r\n"
"CALURI;PREF=1:https://sherlockholmes.com/calendar/sherlockholmes\r\n"
diff --git a/src/vcardtool.cpp b/src/vcardtool.cpp
index e9b07d6..c97c00d 100644
--- a/src/vcardtool.cpp
+++ b/src/vcardtool.cpp
@@ -653,7 +653,7 @@ QByteArray VCardTool::createVCards(const Addressee::List &list,
const QDate date = QDate::fromString(value, Qt::ISODate);
QDateTime dt = QDateTime(date);
dt.setTime(QTime());
- VCardLine line(QStringLiteral("ANNIVERSARY"), createDateTime(dt, version));
+ VCardLine line(QStringLiteral("ANNIVERSARY"), createDateTime(dt, version, false));
card.addLine(line);
}
} else if (identifier.toLower() == QLatin1String("x-kaddressbook-x-spousesname") && version == VCard::v4_0) {