Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

warnings.warn("datetimefield %s received a naive datetime (%s)"

import pytz

date_as_string = request.POST['date-search']
parsed_date = datetime.strptime(date_as_string, '%Y-%m-%d')
amsterdam_timezone = pytz.timezone('Europe/Amsterdam')
date_search = amsterdam_timezone.localize(parsed_date)
 
PREVIOUS NEXT
Tagged: #received #naive #datetime
ADD COMMENT
Topic
Name
8+2 =