Other thing that I forgot in the last mail is how use function now()

Wrong solution

from datetime import datetime
datetime.now()

Good solution

from django.utils import timezone
timezone.now()



2015-04-08 10:16 GMT-06:00 Luis Zárate <luisz...@gmail.com>:

> Do you have installed pytz ?  Django use it when  USE_TZ is  True.
>
> 2015-04-08 6:54 GMT-06:00 Olalla Galiñanes Feijoo <
> olalla.galina...@gmail.com>:
>
> Time zone support is disabled by default. To enable it, set USE_TZ = True
>> <https://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-USE_TZ> in
>> your settings file.
>>
>> https://docs.djangoproject.com/en/1.8/topics/i18n/timezones/
>>
>> El miércoles, 8 de abril de 2015, 14:18:25 (UTC+2), akash...@ranosys.com
>> escribió:
>>>
>>> Hi to all ,
>>>
>>> Previously my settings.py file was having time zone as
>>>
>>> TIME_ZONE = 'America/Chicago'
>>>
>>> now i have changed to
>>> TIME_ZONE = 'Europe/London'
>>>
>>> that not getting reflected means date and time are getting stored in
>>> database as of previous timezone...
>>>
>>>
>>> Please suggest.
>>>
>>  --
>> 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/58feb55f-04db-429d-b168-6302596ae00b%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/58feb55f-04db-429d-b168-6302596ae00b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> "La utopía sirve para caminar" Fernando Birri
>
>
>


-- 
"La utopía sirve para caminar" Fernando Birri

-- 
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/CAG%2B5VyN_%3DxcKpnF%2B%3DD7zM2upTrTLTu8T1YCUOVaeCNB%2Bp5Bcow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to