In article <mailman.5227.1389238511.18130.python-l...@python.org>,
 Ben Finney <ben+pyt...@benfinney.id.au> wrote:

> Chris Angelico <ros...@gmail.com> writes:
> 
> > On Thu, Jan 9, 2014 at 1:25 PM, Roy Smith <r...@panix.com> wrote:
> > > Because it's easy to get a naive one. You call datetime.utcnow(). If
> > > utcnow() returned an aware datetime, that's probably what we would
> > > be using. Why didn't utcnow() just return an aware datetime to begin
> > > with?
> […]
> 
> > But even so, the problem is not "why can't naive timestamps do
> > everything I want". The problem is "why is it so hard to get an aware
> > timestamp for the current instant". And if you ask *that* question,
> > then there's likely to be an answer.
> 
> I think Roy's question hits close to a related problem: that the
> standard library makes it easy to do a sub-optimal thing, and the
> behaviour we all agree is best is not the default.
> 
> So, two questions are raised. One is what you've correctly identified:
> “Why is it so hard to get an aware timestamp for the current instant?”
> The short answer is: because doing that requires a lookup into a
> frequently-updated database, which (because it's so frequently updated)
> isn't installed along with Python.

We have a call in the standard library named utcnow().  That shouldn't 
require a lookup in a database.  "I'm sorry, which value of zero did you 
want?"
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to