summaryrefslogtreecommitdiff
path: root/library/backend/event.cpp
Side-by-side diff
Diffstat (limited to 'library/backend/event.cpp') (more/less context) (show whitespace changes)
-rw-r--r--library/backend/event.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/backend/event.cpp b/library/backend/event.cpp
index 2d02a34..eb238a4 100644
--- a/library/backend/event.cpp
+++ b/library/backend/event.cpp
@@ -1091,54 +1091,54 @@ static inline VObject *safeAddProp( VObject *o, const char *prop)
return ret;
}
/*
* Until we support vCal/iCal right
* we will make DTSTART and other things
* be floating in the sense of
* RFC 2445
*/
namespace {
/*
* Convert QDateTime to iso8601 but take
* local time and do not use the Z at the end
*
*/
QCString toISOLocal( const QDateTime& dt ) {
QCString str;
/*
* year month day T Hour Minute Second
* 4 2 2 2 2 2 digits
*/
str.sprintf("%04d%02d%02dT%02d%02d%02d",
dt.date().year(),
dt.date().month(),
- dt.date().year(),
+ dt.date().day(),
dt.time().hour(),
dt.time().minute(),
dt.time().second() );
-
+ qWarning("Str ist %s", str.data() );
return str;
}
};
static VObject *createVObject( const Event &e )
{
VObject *vcal = newVObject( VCCalProp );
safeAddPropValue( vcal, VCVersionProp, "1.0" );
VObject *event = safeAddProp( vcal, VCEventProp );
safeAddPropValue( event, VCDTstartProp, toISOLocal( e.start() ) );
safeAddPropValue( event, VCDTendProp, toISOLocal( e.end() ) );
safeAddPropValue( event, "X-Qtopia-NOTES", e.description() );
safeAddPropValue( event, VCDescriptionProp, e.description() );
safeAddPropValue( event, VCLocationProp, e.location() );
if ( e.hasAlarm() ) {
VObject *alarm = safeAddProp( event, VCAAlarmProp );
QDateTime dt = e.start();
dt = dt.addSecs( -e.alarmTime()*60 );
safeAddPropValue( alarm, VCRunTimeProp, toISOLocal( dt ) );