mirror of
				https://github.com/SimpleMobileTools/Simple-Calendar.git
				synced 2025-06-05 21:59:17 +02:00 
			
		
		
		
	properly import all-day events from nextcloud type services
This commit is contained in:
		| @@ -259,6 +259,8 @@ class CalDAVHandler(val context: Context) { | |||||||
|                             importId, allDay, repeatRule.repeatLimit, repeatRule.repeatRule, eventTypeId, source = source, location = location) |                             importId, allDay, repeatRule.repeatLimit, repeatRule.repeatRule, eventTypeId, source = source, location = location) | ||||||
|  |  | ||||||
|                     if (event.getIsAllDay() && endTS > startTS) { |                     if (event.getIsAllDay() && endTS > startTS) { | ||||||
|  |                         event.startTS = Formatter.getShiftedImportTimestamp(event.startTS) | ||||||
|  |                         event.endTS = Formatter.getShiftedImportTimestamp(event.endTS) | ||||||
|                         event.endTS -= DAY |                         event.endTS -= DAY | ||||||
|                     } |                     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -99,4 +99,6 @@ object Formatter { | |||||||
|         else |         else | ||||||
|             "0" |             "0" | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     fun getShiftedImportTimestamp(ts: Int) = getDateTimeFromTS(ts).toDateTime(DateTimeZone.UTC).withZoneRetainFields(DateTimeZone.getDefault()).withTime(5, 0, 0, 0).seconds() | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user