[Zope3-dev] mini-RFC: times and timezones
Garrett Smith
garrett at mojave-corp.com
Sat Feb 26 19:51:45 EST 2005
Gary Poster wrote:
> So everyone is clear, hear are some more examples, if Stuart accepts
> the patch or something similar to it.
>
> Current call to get a now that will be stored:
>
> dt = datetime.datetime.utcnow()
>
> After change:
>
> from pytz import utc
> dt = datetime.datetime.now(utc)
>
> The call to convert timezone-aware datetimes from a user to utc will
> be this:
>
> from pytz import utc
> aware.astimezone(utc)
Does this convert aware's timezone? Or return a new object?
-- Garrett
More information about the Zope3-dev
mailing list