mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
add a default event time zone to events imported from .ics files
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user