summaryrefslogtreecommitdiff
path: root/conversion/kabcconversion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'conversion/kabcconversion.cpp')
-rw-r--r--conversion/kabcconversion.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/conversion/kabcconversion.cpp b/conversion/kabcconversion.cpp
index 76d9597..0280213 100644
--- a/conversion/kabcconversion.cpp
+++ b/conversion/kabcconversion.cpp
@@ -703,7 +703,11 @@ Kolab::Contact fromKABC(const KABC::Addressee &addressee)
if (!spouse.isEmpty()) {
c.setRelateds(std::vector<Kolab::Related>() << Kolab::Related(Kolab::Related::Text, toStdString(spouse), Kolab::Related::Spouse));
}
- c.setBDay(fromDate(KDateTime(addressee.birthday(), KDateTime::ClockTime)));
+ QDateTime bDay = addressee.birthday();
+ if (!bDay.time().isValid()) {
+ bDay.setTime(QTime(0,0,0));
+ }
+ c.setBDay(fromDate(KDateTime(bDay, KDateTime::ClockTime)));
c.setAnniversary(fromDate(KDateTime(QDate::fromString( addressee.custom(QLatin1String("KADDRESSBOOK"), QLatin1String("X-Anniversary")), Qt::ISODate ), KDateTime::ClockTime)));
if (!addressee.photo().isEmpty()) {
std::string mimetype;