Get timezone aware datetime
Question: How would I do the following to get a UTC datetime object, so django doesn't
complain about `/Library/Python/2.7/site-
packages/django/db/models/fields/__init__.py:808: RuntimeWarning:
DateTimeField received a naive datetime (2015-02-11 00:00:00) while time zone
support is active. ` ?

    
    
    >>> from django.utils import timezone
    >>> timezone.date(2014,1,1)
    Traceback (most recent call last):
      File "<console>", line 1, in <module>
    AttributeError: 'module' object has no attribute 'date'
    


Answer: Taking your example, you should use `datetime` and specify the tzinfo
argument:

    
    
    timezone.datetime(2014, 1, 1, tzinfo=timezone.UTC())
    

You may also be interested in Django's `make_aware` function:

<https://docs.djangoproject.com/en/dev/ref/utils/#django.utils.timezone.make_aware>

