Thanks for the tip on pytz. It might be what I need.
See django-timezones, django-related helpers around pytz:
http://github.com/brosner/django-timezones
its LocalizedDateTimeField model/form fields construct non-naive python
datetimes with pytz tzinfo.
(see its tests.py for some
On Apr 27, 2010, at 3:36 PM, Peter Herndon wrote:
> Hi Shawn,
>
> http://pytz.sourceforge.net/ looks like it would be useful for converting
> time zone strings.
>
> The one thing I keep hearing, though, whenever anyone brings up time zones
> here on django-users is: "*ALWAYS* store dates in
Hi Shawn,
http://pytz.sourceforge.net/ looks like it would be useful for converting time
zone strings.
The one thing I keep hearing, though, whenever anyone brings up time zones here
on django-users is: "*ALWAYS* store dates in UTC, then convert as needed".
Don't know how useful that is,
Given a date/time value and a value that is valid for the TIME_ZONE setting in
settings.py, how do I convert that date/time to the time zone defined in
settings.py?
Example:
settings.py contains:
TIME_ZONE = 'America/New_York'
Input contains:
4 matches
Mail list logo