I'm using Sqlite for my project database.
I need date and time in my model so i'm using this field.

date = models.DateTimeField()


On the result template (results.html), the time is correct (localtime 
or  TIME_ZONE in my settings.py)
The problem is, when i check the database on Django admin page and sqlite 
db file, it seems like my timezone setting is not applied.(so, maybe UTC)

what is the problem and how could i fix this?

I think the template's parameters are from view, so the timezone.now() is 
correct and passes the right time.
So my guess is that 'date=timezone.now()' passes to sqlite like this: 
'insert into table values (date=datetime('now'))'
and the timezone of sqlite is maybe set to UTC default. 
this is what i'm guessing. am i right? also i do not know how to set sqlite 
database timezone...

p.s On the other side, I also think when we set settings.py TIME_ZONE, 
django would manage all these things.
So don't know where to approach. Spending almost 2 days on this problem...

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6269c301-d704-4294-863d-bb6c65d7140f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to