I know another answer was accepted a while ago, but this question appears high on Google’s search results, so I will add another answer.
If you are working at the template level, you can use the U parameter to the date filter, e.g.:
{{ mydate|date:"U" }}
Note that it will be based upon the TIMEZONE in your settings.py.