forked from Decentrala/website
		
	fix uid ical again
This commit is contained in:
		
							
								
								
									
										5
									
								
								prep.py
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								prep.py
									
									
									
									
									
								
							@@ -56,11 +56,12 @@ def build_ical(events: list[dict]) -> str:
 | 
				
			|||||||
        title = event["title"]
 | 
					        title = event["title"]
 | 
				
			||||||
        location = event["location"]
 | 
					        location = event["location"]
 | 
				
			||||||
        date = event["date"]
 | 
					        date = event["date"]
 | 
				
			||||||
 | 
					        time = event["time"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        uid = str(date.month).zfill(2) + str(date.day).zfill(2) + time[:2]
 | 
				
			||||||
        date = str(date.year) + str(date.month).zfill(2) + str(date.day).zfill(2) 
 | 
					        date = str(date.year) + str(date.month).zfill(2) + str(date.day).zfill(2) 
 | 
				
			||||||
        created = str(today.year) + str(today.month).zfill(2) + str(today.day).zfill(2) + "T" + str(today.hour).zfill(2) + str(today.minute).zfill(2) + str(today.second).zfill(2) + "Z"
 | 
					        created = str(today.year) + str(today.month).zfill(2) + str(today.day).zfill(2) + "T" + str(today.hour).zfill(2) + str(today.minute).zfill(2) + str(today.second).zfill(2) + "Z"
 | 
				
			||||||
        time = event["time"]
 | 
					 | 
				
			||||||
        date = date + "T" + time.replace(":", "") + "00"
 | 
					        date = date + "T" + time.replace(":", "") + "00"
 | 
				
			||||||
        uid = str(date.month).zfill(2) + str(date.day).zfill(2) + time[:2]
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        event_template = ""
 | 
					        event_template = ""
 | 
				
			||||||
        with open("template/event.ical", "r") as file:
 | 
					        with open("template/event.ical", "r") as file:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user