@@ -5,6 +5,8 @@ import bbcode
 | 
			
		||||
 | 
			
		||||
from datetime import datetime, date, timedelta
 | 
			
		||||
from bs4 import BeautifulSoup, MarkupResemblesLocatorWarning
 | 
			
		||||
import pytz
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
from .extractor import *
 | 
			
		||||
 | 
			
		||||
@@ -16,6 +18,8 @@ logger = get_task_logger(__name__)
 | 
			
		||||
class ICALExtractor(Extractor):
 | 
			
		||||
    def __init__(self):
 | 
			
		||||
        super().__init__()
 | 
			
		||||
        self.to_timezone = pytz.timezone("Europe/Paris")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    def get_item_from_vevent(self, event, name, raw=False):
 | 
			
		||||
        try:
 | 
			
		||||
@@ -50,6 +54,7 @@ class ICALExtractor(Extractor):
 | 
			
		||||
 | 
			
		||||
        if item is not None:
 | 
			
		||||
            if isinstance(item, datetime):
 | 
			
		||||
                item = self.to_timezone.normalize(item)
 | 
			
		||||
                day = item.date()
 | 
			
		||||
                time = item.time()
 | 
			
		||||
            elif isinstance(item, date):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user