mirror of
				https://github.com/jhbruhn/ics-adapter.git
				synced 2025-10-28 18:06:07 +00:00 
			
		
		
		
	Fix start datetime of event
This commit is contained in:
		
							parent
							
								
									e555eb611e
								
							
						
					
					
						commit
						2bb5e84f7a
					
				
					 1 changed files with 4 additions and 6 deletions
				
			
		
							
								
								
									
										10
									
								
								src/main.rs
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/main.rs
									
									
									
									
									
								
							|  | @ -93,18 +93,15 @@ async fn convert(urls: &[&str], days: Option<&String>) -> Result<CustomCalendar> | |||
|                     vec!(start) | ||||
|                 }; | ||||
| 
 | ||||
|                 let mut found = false; | ||||
|                 let mut start = None; | ||||
|                 for start_date in start_dates { | ||||
|                     if start_date >= filter_start && start_date <= filter_end { | ||||
|                         found = true; | ||||
|                         start = Some(start_date); | ||||
|                         break; | ||||
|                     } | ||||
|                 } | ||||
| 
 | ||||
|                 if !found { | ||||
|                     continue; | ||||
|                 } | ||||
| 
 | ||||
|                 if let Some(start) = start { | ||||
|                 let end = start + length; | ||||
| 
 | ||||
|                 entries.push(CustomCalendarEntry { | ||||
|  | @ -119,6 +116,7 @@ async fn convert(urls: &[&str], days: Option<&String>) -> Result<CustomCalendar> | |||
|                 }); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         calendar_index += 1; | ||||
|     } | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue