dealing with “MySQL backend does not support timezone-aware datetimes”

When fetching events from an iCal feed and saving this into a database I got

MySQL backend does not support timezone-aware datetimes

This did the trick for me:

Install pytz (download here)

PYTHON:
  1. import pytz
  2. that_datetime_in_utc.astimezone(pytz.timezone('Europe/Zurich')).replace(tzinfo=None)

Caution: I don't really understand what I'm writing here - I feels like all those posts in PHP forums I saw about 'how to ...' and then someone trying to explain something he has no clue of, but well.. :-)

 

Fetch publicly available google calendar data with python

 

Send javascript errors by mail

 

Django: Serve big files via fcgid

 

Python: Sort a list of dicts by dict-key

 

Python: Find out cpu time of a certain process

 

add bandwidth to a file download in python

 

set timeout for a shell command in python

 

Turn demoscene modules into mp3s

 

sched 20 “pizza is ready”