summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/opimevent.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libopie2/opiepim/core/opimevent.cpp b/libopie2/opiepim/core/opimevent.cpp
index 739cb6f..c656c3d 100644
--- a/libopie2/opiepim/core/opimevent.cpp
+++ b/libopie2/opiepim/core/opimevent.cpp
@@ -634,28 +634,28 @@ void OPimEvent::fromMap( const QMap<int, QString>& map )
634 time_t start = ( time_t ) map[ OPimEvent::FStart ].toLong(); 634 time_t start = ( time_t ) map[ OPimEvent::FStart ].toLong();
635 time_t end = ( time_t ) map[ OPimEvent::FEnd ].toLong(); 635 time_t end = ( time_t ) map[ OPimEvent::FEnd ].toLong();
636 636
637 /* AllDay is always in UTC */ 637 /* AllDay is always in UTC */
638 if ( isAllDay() ) 638 if ( isAllDay() )
639 { 639 {
640 OPimTimeZone utc = OPimTimeZone::utc(); 640 OPimTimeZone utc = OPimTimeZone::utc();
641 setStartDateTime(utc.toDateTime( start ) ); 641 setStartDateTime(utc.toDateTime( start ) );
642 setEndDateTime ( utc.toDateTime( end ) ); 642 setEndDateTime ( utc.toDateTime( end ) );
643 } 643 }
644 else { 644 else {
645 /* to current date time */ 645 /* to current date time */
646 OPimTimeZone to_zone( ev.timeZone().isEmpty() ? OPimTimeZone::utc() : OPimTimeZone::current() ); 646 OPimTimeZone to_zone( timeZone().isEmpty() ? OPimTimeZone::utc() : OPimTimeZone::current() );
647 647
648 ev.setStartDateTime(to_zone.toDateTime( start)); 648 setStartDateTime(to_zone.toDateTime( start));
649 ev.setEndDateTime (to_zone.toDateTime( end)); 649 setEndDateTime (to_zone.toDateTime( end));
650 } 650 }
651 651
652 int alarmTime = -1; 652 int alarmTime = -1;
653 if ( !map[ OPimEvent::FAlarm ].isEmpty() ) 653 if ( !map[ OPimEvent::FAlarm ].isEmpty() )
654 alarmTime = map[ OPimEvent::FAlarm ].toInt(); 654 alarmTime = map[ OPimEvent::FAlarm ].toInt();
655 655
656 int sound = ( ( map[ OPimEvent::FSound ] == "loud" ) ? OPimAlarm::Loud : OPimAlarm::Silent ); 656 int sound = ( ( map[ OPimEvent::FSound ] == "loud" ) ? OPimAlarm::Loud : OPimAlarm::Silent );
657 if ( ( alarmTime != -1 ) ) 657 if ( ( alarmTime != -1 ) )
658 { 658 {
659 QDateTime dt = startDateTime().addSecs( -1 * alarmTime * 60 ); 659 QDateTime dt = startDateTime().addSecs( -1 * alarmTime * 60 );
660 OPimAlarm al( sound , dt ); 660 OPimAlarm al( sound , dt );
661 notifiers().add( al ); 661 notifiers().add( al );