add a default event time zone to events imported from .ics files
This commit is contained in:
parent
eb9619dbd9
commit
af7ade1162
|
@ -11,6 +11,7 @@ import com.simplemobiletools.calendar.pro.models.EventType
|
|||
import com.simplemobiletools.calendar.pro.models.Reminder
|
||||
import com.simplemobiletools.commons.extensions.areDigitsOnly
|
||||
import com.simplemobiletools.commons.extensions.showErrorToast
|
||||
import org.joda.time.DateTimeZone
|
||||
import java.io.File
|
||||
|
||||
class IcsImporter(val activity: SimpleActivity) {
|
||||
|
@ -180,7 +181,7 @@ class IcsImporter(val activity: SimpleActivity) {
|
|||
val source = if (calDAVCalendarId == 0 || eventType?.isSyncedEventType() == false) SOURCE_IMPORTED_ICS else "$CALDAV-$calDAVCalendarId"
|
||||
val event = Event(null, curStart, curEnd, curTitle, curLocation, curDescription, reminders[0].minutes,
|
||||
reminders[1].minutes, reminders[2].minutes, reminders[0].type, reminders[1].type, reminders[2].type, curRepeatInterval, curRepeatRule,
|
||||
curRepeatLimit, curRepeatExceptions, "", curImportId, "", curFlags, curEventTypeId, 0, curLastModified, source)
|
||||
curRepeatLimit, curRepeatExceptions, "", curImportId, DateTimeZone.getDefault().id, curFlags, curEventTypeId, 0, curLastModified, source)
|
||||
|
||||
if (event.getIsAllDay() && curEnd > curStart) {
|
||||
event.endTS -= DAY
|
||||
|
|
Loading…
Reference in New Issue