[Python-Dev] Issue 2736: datetimes and Unix timestamps

Guido van Rossum guido at python.org
Tue Jun 5 20:24:16 CEST 2012


On Tue, Jun 5, 2012 at 11:21 AM, Alexander Belopolsky
<alexander.belopolsky at gmail.com> wrote:
> On Tue, Jun 5, 2012 at 1:41 PM, Guido van Rossum <guido at python.org> wrote:
>> Maybe you need to get out more. :-) This is how datetime is
>> represented in App Engine's datastore:
>> https://developers.google.com/appengine/docs/python/datastore/typesandpropertyclasses#DateTimeProperty
>> (Note: These docs are unclear about whether a tzinfo attribute is
>> present. The code is clear that it isn't.)
>
> From the docs: "Some libraries use the TZ environment variable to
> control the time zone applied to date-time values. App Engine sets
> this environment variable to 'UTC'."  This means that  App Engine's
> local timezone is UTC and strictly speaking this is not a counter
> example to what I said.  Proposed mktime() based code will still work
> in this case.

Fair enough. Perhaps unrelated do you think a tzinfo representing
"local time" can be built?

-- 
--Guido van Rossum (python.org/~guido)


More information about the Python-Dev mailing list