summaryrefslogtreecommitdiff
path: root/library
Side-by-side diff
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/event.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/library/backend/event.cpp b/library/backend/event.cpp
index 0003fe9..d906f19 100644
--- a/library/backend/event.cpp
+++ b/library/backend/event.cpp
@@ -605,32 +605,29 @@ QDateTime Event::start( bool actual ) const
return dt;
}
/*
QDateTime Event::end() const {
return end( TRUE );
}
*/
/*!
\internal
*/
QDateTime Event::end( bool actual ) const
{
- QDateTime dt = TimeConversion::fromUTC( endUTC );
-
+ /* small work around... */
if ( actual && typ == AllDay ) {
- QTime t = dt.time();
- t.setHMS( 23, 59, 59 );
- dt.setTime( t );
+ return QDateTime( TimeConversion::fromUTC( startUTC ).date(), QTime(23, 59, 59 ) );
}
- return dt;
+ return TimeConversion::fromUTC( endUTC );
}
/*!
\internal
*/
const QString &Event::timeZone() const
{
return tz;
}
/*!
\internal