Django: Set datetime in views to utc+1
datetime, django, python, timezone
Solution
Marking the comment as an answer
In your settings file, `USE_TZ=True` and `TIME_ZONE='CET'` should do the trick
The documentation is here
Here are a list of valid timezones
Problem
I have checked around a bit, both here and Google, without finding an exact answer to what I'm looking for. I'm currently working on a Django-project and I seem to live in one of those areas where the concept of a timezone ain't regarded very highly. The timezone here is CEST, alternative: UTC+1, but neither can be set in my settings-file. I have searched around for how to change this, and one alternative is to download and include a library which should do the trick, after a bit of tweaking. But I wonder if there is a smoother, swifter way to do this. `date = datetime.datetime.now()` gives me the time for two hours ago. I can use both UTC and GMT, but neither is close enough.