work on timezone
This commit is contained in:
		@ -17,7 +17,7 @@ def date_or_default(date, no_time = False):
 | 
			
		||||
    if date_only is True
 | 
			
		||||
    """
 | 
			
		||||
    date = date or tz.now()
 | 
			
		||||
    if not tz.is_aware(date):
 | 
			
		||||
    if issubclass(date, date.datetime) not tz.is_aware(date):
 | 
			
		||||
        date = tz.make_aware(date)
 | 
			
		||||
    if no_time:
 | 
			
		||||
        return as_date(date)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user