Forums

date time field has London time not time at the place the record was created

When I save the created_at date field, the time is always London time and not time at the place the record was created. Is there a setting either in PythonAnywhere or MySQL to change it to current timezone?

Below is the line in models.py

created_at = m.DateTimeField(default=datetime.datetime.now)

When you say models.py, I assume this is a django project.

Is this related to what you are looking for?

Thanks - will try it out.